diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:57 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:29 -0500 |
commit | 34286d6662308d82aed891852d04c7c3a2649b16 (patch) | |
tree | c4b7311404d302e7cb94df7a4690298e1059910a /fs/autofs4 | |
parent | 44a7d7a878c9cbb74f236ea755b25b6b2e26a9a9 (diff) |
fs: rcu-walk aware d_revalidate method
Require filesystems be aware of .d_revalidate being called in rcu-walk
mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning
-ECHILD from all implementations.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/autofs4')
-rw-r--r-- | fs/autofs4/root.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index bfe3f2eb684d..651e4ef563b1 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -315,12 +315,19 @@ out_error: | |||
315 | */ | 315 | */ |
316 | static int autofs4_revalidate(struct dentry *dentry, struct nameidata *nd) | 316 | static int autofs4_revalidate(struct dentry *dentry, struct nameidata *nd) |
317 | { | 317 | { |
318 | struct inode *dir = dentry->d_parent->d_inode; | 318 | struct inode *dir; |
319 | struct autofs_sb_info *sbi = autofs4_sbi(dir->i_sb); | 319 | struct autofs_sb_info *sbi; |
320 | int oz_mode = autofs4_oz_mode(sbi); | 320 | int oz_mode; |
321 | int flags = nd ? nd->flags : 0; | 321 | int flags = nd ? nd->flags : 0; |
322 | int status = 1; | 322 | int status = 1; |
323 | 323 | ||
324 | if (flags & LOOKUP_RCU) | ||
325 | return -ECHILD; | ||
326 | |||
327 | dir = dentry->d_parent->d_inode; | ||
328 | sbi = autofs4_sbi(dir->i_sb); | ||
329 | oz_mode = autofs4_oz_mode(sbi); | ||
330 | |||
324 | /* Pending dentry */ | 331 | /* Pending dentry */ |
325 | spin_lock(&sbi->fs_lock); | 332 | spin_lock(&sbi->fs_lock); |
326 | if (autofs4_ispending(dentry)) { | 333 | if (autofs4_ispending(dentry)) { |