diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-21 18:22:44 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 04:57:36 -0400 |
commit | da53be12bbb4fabbe2e9f6f908de0cf478b5161d (patch) | |
tree | a0436fb462a7b16c82e58336e17c55b814f7be6b /Documentation/filesystems/Locking | |
parent | 642b704cd7a29be0b8900971eb525086c1c995b7 (diff) |
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>
Diffstat (limited to 'Documentation/filesystems/Locking')
-rw-r--r-- | Documentation/filesystems/Locking | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index bdd82b2339d9..f94a362f408e 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -11,10 +11,8 @@ be able to use diff(1). | |||
11 | prototypes: | 11 | prototypes: |
12 | int (*d_revalidate)(struct dentry *, unsigned int); | 12 | int (*d_revalidate)(struct dentry *, unsigned int); |
13 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | 13 | int (*d_weak_revalidate)(struct dentry *, unsigned int); |
14 | int (*d_hash)(const struct dentry *, const struct inode *, | 14 | int (*d_hash)(const struct dentry *, struct qstr *); |
15 | struct qstr *); | 15 | int (*d_compare)(const struct dentry *, const struct dentry *, |
16 | int (*d_compare)(const struct dentry *, const struct inode *, | ||
17 | const struct dentry *, const struct inode *, | ||
18 | unsigned int, const char *, const struct qstr *); | 16 | unsigned int, const char *, const struct qstr *); |
19 | int (*d_delete)(struct dentry *); | 17 | int (*d_delete)(struct dentry *); |
20 | void (*d_release)(struct dentry *); | 18 | void (*d_release)(struct dentry *); |