diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 07:49:57 +0100 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 07:50:29 +0100 |
commit | 34286d6662308d82aed891852d04c7c3a2649b16 (patch) | |
tree | c4b7311404d302e7cb94df7a4690298e1059910a /fs/fuse | |
parent | fs: cache optimise dentry and inode for rcu-walk (diff) | |
download | linux-34286d6662308d82aed891852d04c7c3a2649b16.tar.xz linux-34286d6662308d82aed891852d04c7c3a2649b16.zip |
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/fuse')
-rw-r--r-- | fs/fuse/dir.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index c9a8a426a395..07f4b5e675fc 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -156,8 +156,12 @@ u64 fuse_get_attr_version(struct fuse_conn *fc) */ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) { - struct inode *inode = entry->d_inode; + struct inode *inode; + + if (nd->flags & LOOKUP_RCU) + return -ECHILD; + inode = entry->d_inode; if (inode && is_bad_inode(inode)) return 0; else if (fuse_dentry_time(entry) < get_jiffies_64()) { |