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/afs | |
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/afs')
-rw-r--r-- | fs/afs/dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index b8bb7e7148d0..34a3263d60a4 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/namei.h> | ||
16 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
17 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
18 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
@@ -607,6 +608,9 @@ static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd) | |||
607 | void *dir_version; | 608 | void *dir_version; |
608 | int ret; | 609 | int ret; |
609 | 610 | ||
611 | if (nd->flags & LOOKUP_RCU) | ||
612 | return -ECHILD; | ||
613 | |||
610 | vnode = AFS_FS_I(dentry->d_inode); | 614 | vnode = AFS_FS_I(dentry->d_inode); |
611 | 615 | ||
612 | if (dentry->d_inode) | 616 | if (dentry->d_inode) |