Don't pass inode to ->d_hash() and ->d_compare()
Instances either don't look at it at all (the majority of cases) or only want it to find the superblock (which can be had as dentry->d_sb). A few cases that want more are actually safe with dentry->d_inode - the only precaution needed is the check that it hadn't been replaced with NULL by rmdir() or by overwriting rename(), which case should be simply treated as cache miss. Signed-off-by:Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
Showing
- Documentation/filesystems/Locking 2 additions, 4 deletionsDocumentation/filesystems/Locking
- Documentation/filesystems/vfs.txt 8 additions, 11 deletionsDocumentation/filesystems/vfs.txt
- fs/adfs/dir.c 2 additions, 4 deletionsfs/adfs/dir.c
- fs/affs/namei.c 8 additions, 18 deletionsfs/affs/namei.c
- fs/cifs/dir.c 3 additions, 6 deletionsfs/cifs/dir.c
- fs/dcache.c 10 additions, 17 deletionsfs/dcache.c
- fs/efivarfs/super.c 4 additions, 5 deletionsfs/efivarfs/super.c
- fs/fat/namei_msdos.c 2 additions, 4 deletionsfs/fat/namei_msdos.c
- fs/fat/namei_vfat.c 4 additions, 8 deletionsfs/fat/namei_vfat.c
- fs/gfs2/dentry.c 1 addition, 2 deletionsfs/gfs2/dentry.c
- fs/hfs/hfs_fs.h 2 additions, 5 deletionsfs/hfs/hfs_fs.h
- fs/hfs/string.c 2 additions, 4 deletionsfs/hfs/string.c
- fs/hfsplus/hfsplus_fs.h 2 additions, 5 deletionsfs/hfsplus/hfsplus_fs.h
- fs/hfsplus/unicode.c 2 additions, 5 deletionsfs/hfsplus/unicode.c
- fs/hpfs/dentry.c 2 additions, 5 deletionsfs/hpfs/dentry.c
- fs/isofs/inode.c 16 additions, 32 deletionsfs/isofs/inode.c
- fs/isofs/namei.c 1 addition, 2 deletionsfs/isofs/namei.c
- fs/jfs/namei.c 2 additions, 5 deletionsfs/jfs/namei.c
- fs/namei.c 3 additions, 4 deletionsfs/namei.c
- fs/ncpfs/dir.c 24 additions, 8 deletionsfs/ncpfs/dir.c
Please register or sign in to comment