summaryrefslogtreecommitdiffstats
path: root/net/unix
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-06-12 12:05:21 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2016-06-12 12:05:21 +0200
commit30402c8949934fbaca07d9c20074d0d7a5a8385f (patch)
treef63ddb91f4bed559358c2478f61718a5b23f99b1 /net/unix
parentovl: xattr filter fix (diff)
parentaf_unix: fix hard linked sockets on overlay (diff)
downloadlinux-30402c8949934fbaca07d9c20074d0d7a5a8385f.tar.xz
linux-30402c8949934fbaca07d9c20074d0d7a5a8385f.zip
Merge branch 'overlayfs-af_unix-fix' into overlayfs-linus
Diffstat (limited to 'net/unix')
-rw-r--r--net/unix/af_unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 80aa6a3e6817..735362c26c8e 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -315,7 +315,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 && d_backing_inode(dentry) == i) {
+ if (dentry && d_real_inode(dentry) == i) {
sock_hold(s);
goto found;
}
@@ -911,7 +911,7 @@ static struct sock *unix_find_other(struct net *net,
err = kern_path(sunname->sun_path, LOOKUP_FOLLOW, &path);
if (err)
goto fail;
- inode = d_backing_inode(path.dentry);
+ inode = d_real_inode(path.dentry);
err = inode_permission(inode, MAY_WRITE);
if (err)
goto put_fail;
@@ -1048,7 +1048,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
goto out_up;
}
addr->hash = UNIX_HASH_SIZE;
- hash = d_backing_inode(dentry)->i_ino & (UNIX_HASH_SIZE - 1);
+ hash = d_real_inode(dentry)->i_ino & (UNIX_HASH_SIZE - 1);
spin_lock(&unix_table_lock);
u->path = u_path;
list = &unix_socket_table[hash];