aboutsummaryrefslogtreecommitdiffstats
path: root/fs/adfs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:49:27 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:19 -0500
commit621e155a3591962420eacdd39f6f0aa29ceb221e (patch)
tree387a9fb396f1bf24514b712c294182e36ba51076 /fs/adfs
parentfb2d5b86aff355a27ebfc132d3c99f4a940cc3fe (diff)
fs: change d_compare for rcu-walk
Change d_compare so it may be called from lock-free RCU lookups. This does put significant restrictions on what may be done from the callback, however there don't seem to have been any problems with in-tree fses. If some strange use case pops up that _really_ cannot cope with the rcu-walk rules, we can just add new rcu-unaware callbacks, which would cause name lookup to drop out of rcu-walk mode. For in-tree filesystems, this is just a mechanical change. Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/adfs')
-rw-r--r--fs/adfs/dir.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
index f4287e4de744..c8ed66162bd4 100644
--- a/fs/adfs/dir.c
+++ b/fs/adfs/dir.c
@@ -237,17 +237,19 @@ adfs_hash(struct dentry *parent, struct qstr *qstr)
237 * requirements of the underlying filesystem. 237 * requirements of the underlying filesystem.
238 */ 238 */
239static int 239static int
240adfs_compare(struct dentry *parent, struct qstr *entry, struct qstr *name) 240adfs_compare(const struct dentry *parent, const struct inode *pinode,
241 const struct dentry *dentry, const struct inode *inode,
242 unsigned int len, const char *str, const struct qstr *name)
241{ 243{
242 int i; 244 int i;
243 245
244 if (entry->len != name->len) 246 if (len != name->len)
245 return 1; 247 return 1;
246 248
247 for (i = 0; i < name->len; i++) { 249 for (i = 0; i < name->len; i++) {
248 char a, b; 250 char a, b;
249 251
250 a = entry->name[i]; 252 a = str[i];
251 b = name->name[i]; 253 b = name->name[i];
252 254
253 if (a >= 'A' && a <= 'Z') 255 if (a >= 'A' && a <= 'Z')