diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 22:26:21 +0000 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-07-11 10:20:11 -0400 |
commit | b65b0f675afb1cb5d3daff91e3bb7722f9d7ec9c (patch) | |
tree | 939f1df96a128aed12c624ad4d7ae6d212bd2707 /net/unix | |
parent | d420f00c7bfb405884dd71fb7f87974f0d1be455 (diff) | |
download | linux-stable-b65b0f675afb1cb5d3daff91e3bb7722f9d7ec9c.tar.gz linux-stable-b65b0f675afb1cb5d3daff91e3bb7722f9d7ec9c.tar.bz2 linux-stable-b65b0f675afb1cb5d3daff91e3bb7722f9d7ec9c.zip |
VFS: net/unix: d_backing_inode() annotations
[ Upstream commit a25b376bded1ba7fd1d455e140d723b7de2e343c ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net/unix')
-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 20d752634efb..bba93a6575f8 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) &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { struct dentry *dentry = unix_sk(s)->path.dentry; - if (dentry && dentry->d_inode == i) { + if (dentry && d_backing_inode(dentry) == i) { sock_hold(s); goto found; } @@ -898,7 +898,7 @@ static struct sock *unix_find_other(struct net *net, err = kern_path(sunname->sun_path, LOOKUP_FOLLOW, &path); if (err) goto fail; - inode = path.dentry->d_inode; + inode = d_backing_inode(path.dentry); err = inode_permission(inode, MAY_WRITE); if (err) goto put_fail; @@ -1025,7 +1025,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) goto out_up; } addr->hash = UNIX_HASH_SIZE; - hash = path.dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1); + hash = d_backing_inode(path.dentry)->i_ino & (UNIX_HASH_SIZE-1); spin_lock(&unix_table_lock); u->path = path; list = &unix_socket_table[hash]; diff --git a/net/unix/diag.c b/net/unix/diag.c index 86fa0f3b2caf..9d4218fc0a61 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) if (dentry) { struct unix_diag_vfs uv = { - .udiag_vfs_ino = dentry->d_inode->i_ino, + .udiag_vfs_ino = d_backing_inode(dentry)->i_ino, .udiag_vfs_dev = dentry->d_sb->s_dev, }; |