]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/dcache.c
Don't pass inode to ->d_hash() and ->d_compare()
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 May 2013 22:22:44 +0000 (15:22 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Jun 2013 08:57:36 +0000 (12:57 +0400)
commitda53be12bbb4fabbe2e9f6f908de0cf478b5161d
treea0436fb462a7b16c82e58336e17c55b814f7be6b
parent642b704cd7a29be0b8900971eb525086c1c995b7
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>
23 files changed:
Documentation/filesystems/Locking
Documentation/filesystems/vfs.txt
fs/adfs/dir.c
fs/affs/namei.c
fs/cifs/dir.c
fs/dcache.c
fs/efivarfs/super.c
fs/fat/namei_msdos.c
fs/fat/namei_vfat.c
fs/gfs2/dentry.c
fs/hfs/hfs_fs.h
fs/hfs/string.c
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/unicode.c
fs/hpfs/dentry.c
fs/isofs/inode.c
fs/isofs/namei.c
fs/jfs/namei.c
fs/namei.c
fs/ncpfs/dir.c
fs/proc/proc_sysctl.c
fs/sysv/namei.c
include/linux/dcache.h