Loading include/linux/dcache.h +12 −0 Original line number Diff line number Diff line Loading @@ -575,5 +575,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry, return inode; } /** * d_real_inode - Return the real inode * @dentry: The dentry to query * * If dentry is on an union/overlay, then return the underlying, real inode. * Otherwise return d_inode(). */ static inline struct inode *d_real_inode(struct dentry *dentry) { return d_backing_inode(d_real(dentry)); } #endif /* __LINUX_DCACHE_H */ net/unix/af_unix.c +3 −3 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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; Loading Loading @@ -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]; Loading Loading
include/linux/dcache.h +12 −0 Original line number Diff line number Diff line Loading @@ -575,5 +575,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry, return inode; } /** * d_real_inode - Return the real inode * @dentry: The dentry to query * * If dentry is on an union/overlay, then return the underlying, real inode. * Otherwise return d_inode(). */ static inline struct inode *d_real_inode(struct dentry *dentry) { return d_backing_inode(d_real(dentry)); } #endif /* __LINUX_DCACHE_H */
net/unix/af_unix.c +3 −3 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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; Loading Loading @@ -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]; Loading