diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:28 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:20 -0500 |
commit | b1e6a015a580ad145689ad1d6b4aa0e03e6c868b (patch) | |
tree | 57a10ef164e4d2f798d9b832dbeaf973aca2ab83 /fs/namei.c | |
parent | 621e155a3591962420eacdd39f6f0aa29ceb221e (diff) |
fs: change d_hash for rcu-walk
Change d_hash so it may be called from lock-free RCU lookups. See similar
patch for d_compare for details.
For in-tree filesystems, this is just a mechanical change.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 4ff7ca530533..f3b5ca404659 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -731,7 +731,8 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, | |||
731 | * to use its own hash.. | 731 | * to use its own hash.. |
732 | */ | 732 | */ |
733 | if (nd->path.dentry->d_op && nd->path.dentry->d_op->d_hash) { | 733 | if (nd->path.dentry->d_op && nd->path.dentry->d_op->d_hash) { |
734 | int err = nd->path.dentry->d_op->d_hash(nd->path.dentry, name); | 734 | int err = nd->path.dentry->d_op->d_hash(nd->path.dentry, |
735 | nd->path.dentry->d_inode, name); | ||
735 | if (err < 0) | 736 | if (err < 0) |
736 | return err; | 737 | return err; |
737 | } | 738 | } |
@@ -1134,7 +1135,7 @@ static struct dentry *__lookup_hash(struct qstr *name, | |||
1134 | * to use its own hash.. | 1135 | * to use its own hash.. |
1135 | */ | 1136 | */ |
1136 | if (base->d_op && base->d_op->d_hash) { | 1137 | if (base->d_op && base->d_op->d_hash) { |
1137 | err = base->d_op->d_hash(base, name); | 1138 | err = base->d_op->d_hash(base, inode, name); |
1138 | dentry = ERR_PTR(err); | 1139 | dentry = ERR_PTR(err); |
1139 | if (err < 0) | 1140 | if (err < 0) |
1140 | goto out; | 1141 | goto out; |