aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:49:28 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:20 -0500
commitb1e6a015a580ad145689ad1d6b4aa0e03e6c868b (patch)
tree57a10ef164e4d2f798d9b832dbeaf973aca2ab83 /fs/cifs
parent621e155a3591962420eacdd39f6f0aa29ceb221e (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/cifs')
-rw-r--r--fs/cifs/dir.c5
-rw-r--r--fs/cifs/readdir.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index c60133f0d8e4..88bfe686ac00 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -700,9 +700,10 @@ const struct dentry_operations cifs_dentry_ops = {
700/* d_delete: cifs_d_delete, */ /* not needed except for debugging */ 700/* d_delete: cifs_d_delete, */ /* not needed except for debugging */
701}; 701};
702 702
703static int cifs_ci_hash(struct dentry *dentry, struct qstr *q) 703static int cifs_ci_hash(const struct dentry *dentry, const struct inode *inode,
704 struct qstr *q)
704{ 705{
705 struct nls_table *codepage = CIFS_SB(dentry->d_inode->i_sb)->local_nls; 706 struct nls_table *codepage = CIFS_SB(dentry->d_sb)->local_nls;
706 unsigned long hash; 707 unsigned long hash;
707 int i; 708 int i;
708 709
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index a73eb9f4bdaf..ee463aeca0b0 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -79,7 +79,7 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
79 cFYI(1, "For %s", name->name); 79 cFYI(1, "For %s", name->name);
80 80
81 if (parent->d_op && parent->d_op->d_hash) 81 if (parent->d_op && parent->d_op->d_hash)
82 parent->d_op->d_hash(parent, name); 82 parent->d_op->d_hash(parent, parent->d_inode, name);
83 else 83 else
84 name->hash = full_name_hash(name->name, name->len); 84 name->hash = full_name_hash(name->name, name->len);
85 85