mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-12 12:30:17 +01:00
netns: remove BUG_ONs from net_generic()
This inline has ~500 callsites.
On 04/14/2015 08:37 PM, David Miller wrote:
> That BUG_ON() was added 7 years ago, and I don't remember it ever
> triggering or helping us diagnose something, so just remove it and
> keep the function inlined.
On x86 allyesconfig build:
text data bss dec hex filename
82447071 22255384 20627456 125329911 77861f7 vmlinux4
82441375 22255384 20627456 125324215 7784bb7 vmlinux5prime
Signed-off-by: Denys Vlasenko <[email protected]>
CC: Eric W. Biederman <[email protected]>
CC: David S. Miller <[email protected]>
CC: Jan Engelhardt <[email protected]>
CC: Jiri Pirko <[email protected]>
CC: [email protected]
CC: [email protected]
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
2c15395974
commit
2591ffd308
1 file changed
-2
@@ -38,11 +38,9 @@ static inline void *net_generic(const struct net *net, int id)
|
||||
|
||||
rcu_read_lock();
|
||||
ng = rcu_dereference(net->gen);
|
||||
BUG_ON(id == 0 || id > ng->len);
|
||||
ptr = ng->ptr[id - 1];
|
||||
rcu_read_unlock();
|
||||
|
||||
BUG_ON(!ptr);
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user