summaryrefslogtreecommitdiffstats
path: root/include/net/netns/generic.h
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2015-04-17 19:06:30 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-17 15:21:48 -0400
commit2591ffd3085e34a231480efe8f1cac83ebb81725 (patch)
tree236ca367e864bfa6e0cabe3afad6d5e8e83826d6 /include/net/netns/generic.h
parent2c1539597419df6dfeb8ed774d60198b5830b8f7 (diff)
downloadblackbird-obmc-linux-2591ffd3085e34a231480efe8f1cac83ebb81725.tar.gz
blackbird-obmc-linux-2591ffd3085e34a231480efe8f1cac83ebb81725.zip
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 <dvlasenk@redhat.com> CC: Eric W. Biederman <ebiederm@xmission.com> CC: David S. Miller <davem@davemloft.net> CC: Jan Engelhardt <jengelh@medozas.de> CC: Jiri Pirko <jpirko@redhat.com> CC: linux-kernel@vger.kernel.org CC: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns/generic.h')
-rw-r--r--include/net/netns/generic.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h
index 0931618c0f7f..70e158551704 100644
--- a/include/net/netns/generic.h
+++ b/include/net/netns/generic.h
@@ -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
OpenPOWER on IntegriCloud