diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-07-20 01:34:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-20 01:34:43 -0400 |
commit | 721499e8931c5732202481ae24f2dfbf9910f129 (patch) | |
tree | c94d8d681966109bb41f712f21f3a9825ae2172d /net/sctp | |
parent | 407d819cf0fd54c6fc1138a509225696aecafd15 (diff) |
netns: Use net_eq() to compare net-namespaces for optimization.
Without CONFIG_NET_NS, namespace is always &init_net.
Compiler will be able to omit namespace comparisons with this patch.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index ed9acffe8105..a6e0818bcff5 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -668,7 +668,7 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
668 | struct sctp_sockaddr_entry *temp; | 668 | struct sctp_sockaddr_entry *temp; |
669 | int found = 0; | 669 | int found = 0; |
670 | 670 | ||
671 | if (dev_net(ifa->ifa_dev->dev) != &init_net) | 671 | if (!net_eq(dev_net(ifa->ifa_dev->dev), &init_net)) |
672 | return NOTIFY_DONE; | 672 | return NOTIFY_DONE; |
673 | 673 | ||
674 | switch (ev) { | 674 | switch (ev) { |