diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-06-12 06:05:21 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-06-12 06:05:21 -0400 |
commit | 30402c8949934fbaca07d9c20074d0d7a5a8385f (patch) | |
tree | f63ddb91f4bed559358c2478f61718a5b23f99b1 /net | |
parent | b581755b1c565391c72d03b157ba2dd0b18e9d15 (diff) | |
parent | eb0a4a47ae89aaa0674ab3180de6a162f3be2ddf (diff) |
Merge branch 'overlayfs-af_unix-fix' into overlayfs-linus
Diffstat (limited to 'net')
-rw-r--r-- | net/unix/af_unix.c | 6 |
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) | |||
315 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { | 315 | &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { |
316 | struct dentry *dentry = unix_sk(s)->path.dentry; | 316 | struct dentry *dentry = unix_sk(s)->path.dentry; |
317 | 317 | ||
318 | if (dentry && d_backing_inode(dentry) == i) { | 318 | if (dentry && d_real_inode(dentry) == i) { |
319 | sock_hold(s); | 319 | sock_hold(s); |
320 | goto found; | 320 | goto found; |
321 | } | 321 | } |
@@ -911,7 +911,7 @@ static struct sock *unix_find_other(struct net *net, | |||
911 | err = kern_path(sunname->sun_path, LOOKUP_FOLLOW, &path); | 911 | err = kern_path(sunname->sun_path, LOOKUP_FOLLOW, &path); |
912 | if (err) | 912 | if (err) |
913 | goto fail; | 913 | goto fail; |
914 | inode = d_backing_inode(path.dentry); | 914 | inode = d_real_inode(path.dentry); |
915 | err = inode_permission(inode, MAY_WRITE); | 915 | err = inode_permission(inode, MAY_WRITE); |
916 | if (err) | 916 | if (err) |
917 | goto put_fail; | 917 | goto put_fail; |
@@ -1048,7 +1048,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
1048 | goto out_up; | 1048 | goto out_up; |
1049 | } | 1049 | } |
1050 | addr->hash = UNIX_HASH_SIZE; | 1050 | addr->hash = UNIX_HASH_SIZE; |
1051 | hash = d_backing_inode(dentry)->i_ino & (UNIX_HASH_SIZE - 1); | 1051 | hash = d_real_inode(dentry)->i_ino & (UNIX_HASH_SIZE - 1); |
1052 | spin_lock(&unix_table_lock); | 1052 | spin_lock(&unix_table_lock); |
1053 | u->path = u_path; | 1053 | u->path = u_path; |
1054 | list = &unix_socket_table[hash]; | 1054 | list = &unix_socket_table[hash]; |