diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 14:57:35 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-25 15:40:00 -0400 |
commit | 878628fbf2589eb24357e42027d5f54b1dafd3c8 (patch) | |
tree | 30c109d8f337b3910e3b5364877c3c521dd700b5 /net/unix | |
parent | 57da52c1e62c6c13875e97de6c69d3156f8416da (diff) |
[NET] NETNS: Omit namespace comparision without CONFIG_NET_NS.
Introduce an inline net_eq() to compare two namespaces.
Without CONFIG_NET_NS, since no namespace other than &init_net
exists, it is always 1.
We do not need to convert 1) inline vs inline and
2) inline vs &init_net comparisons.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 4a4793051bc..50bbf6bb1a2 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -252,7 +252,7 @@ static struct sock *__unix_find_socket_byname(struct net *net, | |||
252 | sk_for_each(s, node, &unix_socket_table[hash ^ type]) { | 252 | sk_for_each(s, node, &unix_socket_table[hash ^ type]) { |
253 | struct unix_sock *u = unix_sk(s); | 253 | struct unix_sock *u = unix_sk(s); |
254 | 254 | ||
255 | if (sock_net(s) != net) | 255 | if (!net_eq(sock_net(s), net)) |
256 | continue; | 256 | continue; |
257 | 257 | ||
258 | if (u->addr->len == len && | 258 | if (u->addr->len == len && |
@@ -289,7 +289,7 @@ static struct sock *unix_find_socket_byinode(struct net *net, struct inode *i) | |||
289 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { | 289 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { |
290 | struct dentry *dentry = unix_sk(s)->dentry; | 290 | struct dentry *dentry = unix_sk(s)->dentry; |
291 | 291 | ||
292 | if (sock_net(s) != net) | 292 | if (!net_eq(sock_net(s), net)) |
293 | continue; | 293 | continue; |
294 | 294 | ||
295 | if(dentry && dentry->d_inode == i) | 295 | if(dentry && dentry->d_inode == i) |