diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:26:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:56 -0400 |
commit | a25b376bded1ba7fd1d455e140d723b7de2e343c (patch) | |
tree | 819f50a97d38ef190458a98be08f786e39e6984e | |
parent | 7682c918439d42291df0d76b3e06627f27fbcdef (diff) |
VFS: net/unix: d_backing_inode() annotations
places where we are dealing with S_ISSOCK file creation/lookups.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | net/unix/af_unix.c | 6 | ||||
-rw-r--r-- | net/unix/diag.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 8b8f5e6d20bc..5266ea7b922b 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -305,7 +305,7 @@ static struct sock *unix_find_socket_byinode(struct inode *i) | |||
305 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { | 305 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { |
306 | struct dentry *dentry = unix_sk(s)->path.dentry; | 306 | struct dentry *dentry = unix_sk(s)->path.dentry; |
307 | 307 | ||
308 | if (dentry && dentry->d_inode == i) { | 308 | if (dentry && d_backing_inode(dentry) == i) { |
309 | sock_hold(s); | 309 | sock_hold(s); |
310 | goto found; | 310 | goto found; |
311 | } | 311 | } |
@@ -778,7 +778,7 @@ static struct sock *unix_find_other(struct net *net, | |||
778 | err = kern_path(sunname->sun_path, LOOKUP_FOLLOW, &path); | 778 | err = kern_path(sunname->sun_path, LOOKUP_FOLLOW, &path); |
779 | if (err) | 779 | if (err) |
780 | goto fail; | 780 | goto fail; |
781 | inode = path.dentry->d_inode; | 781 | inode = d_backing_inode(path.dentry); |
782 | err = inode_permission(inode, MAY_WRITE); | 782 | err = inode_permission(inode, MAY_WRITE); |
783 | if (err) | 783 | if (err) |
784 | goto put_fail; | 784 | goto put_fail; |
@@ -905,7 +905,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
905 | goto out_up; | 905 | goto out_up; |
906 | } | 906 | } |
907 | addr->hash = UNIX_HASH_SIZE; | 907 | addr->hash = UNIX_HASH_SIZE; |
908 | hash = path.dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1); | 908 | hash = d_backing_inode(path.dentry)->i_ino & (UNIX_HASH_SIZE-1); |
909 | spin_lock(&unix_table_lock); | 909 | spin_lock(&unix_table_lock); |
910 | u->path = path; | 910 | u->path = path; |
911 | list = &unix_socket_table[hash]; | 911 | list = &unix_socket_table[hash]; |
diff --git a/net/unix/diag.c b/net/unix/diag.c index ef542fbca9fe..c512f64d5287 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c | |||
@@ -25,7 +25,7 @@ static int sk_diag_dump_vfs(struct sock *sk, struct sk_buff *nlskb) | |||
25 | 25 | ||
26 | if (dentry) { | 26 | if (dentry) { |
27 | struct unix_diag_vfs uv = { | 27 | struct unix_diag_vfs uv = { |
28 | .udiag_vfs_ino = dentry->d_inode->i_ino, | 28 | .udiag_vfs_ino = d_backing_inode(dentry)->i_ino, |
29 | .udiag_vfs_dev = dentry->d_sb->s_dev, | 29 | .udiag_vfs_dev = dentry->d_sb->s_dev, |
30 | }; | 30 | }; |
31 | 31 | ||