Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Howells and committed by
Al Viro
a25b376b 7682c918

+4 -4
+3 -3
net/unix/af_unix.c
··· 305 305 &unix_socket_table[i->i_ino & (UNIX_HASH_SIZE - 1)]) { 306 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 309 sock_hold(s); 310 310 goto found; 311 311 } ··· 778 778 err = kern_path(sunname->sun_path, LOOKUP_FOLLOW, &path); 779 779 if (err) 780 780 goto fail; 781 - inode = path.dentry->d_inode; 781 + inode = d_backing_inode(path.dentry); 782 782 err = inode_permission(inode, MAY_WRITE); 783 783 if (err) 784 784 goto put_fail; ··· 905 905 goto out_up; 906 906 } 907 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 909 spin_lock(&unix_table_lock); 910 910 u->path = path; 911 911 list = &unix_socket_table[hash];
+1 -1
net/unix/diag.c
··· 25 25 26 26 if (dentry) { 27 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 29 .udiag_vfs_dev = dentry->d_sb->s_dev, 30 30 }; 31 31