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/fuse/dir.c | |
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/fuse/dir.c')
-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) | |||
156 | */ | 156 | */ |
157 | static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) | 157 | static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) |
158 | { | 158 | { |
159 | struct inode *inode = entry->d_inode; | 159 | struct inode *inode; |
160 | |||
161 | if (nd->flags & LOOKUP_RCU) | ||
162 | return -ECHILD; | ||
160 | 163 | ||
164 | inode = entry->d_inode; | ||
161 | if (inode && is_bad_inode(inode)) | 165 | if (inode && is_bad_inode(inode)) |
162 | return 0; | 166 | return 0; |
163 | else if (fuse_dentry_time(entry) < get_jiffies_64()) { | 167 | else if (fuse_dentry_time(entry) < get_jiffies_64()) { |