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/ceph/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/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index cc01cf826769..fa7ca04ee816 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -990,7 +990,12 @@ static int dir_lease_is_valid(struct inode *dir, struct dentry *dentry) | |||
990 | */ | 990 | */ |
991 | static int ceph_d_revalidate(struct dentry *dentry, struct nameidata *nd) | 991 | static int ceph_d_revalidate(struct dentry *dentry, struct nameidata *nd) |
992 | { | 992 | { |
993 | struct inode *dir = dentry->d_parent->d_inode; | 993 | struct inode *dir; |
994 | |||
995 | if (nd->flags & LOOKUP_RCU) | ||
996 | return -ECHILD; | ||
997 | |||
998 | dir = dentry->d_parent->d_inode; | ||
994 | 999 | ||
995 | dout("d_revalidate %p '%.*s' inode %p offset %lld\n", dentry, | 1000 | dout("d_revalidate %p '%.*s' inode %p offset %lld\n", dentry, |
996 | dentry->d_name.len, dentry->d_name.name, dentry->d_inode, | 1001 | dentry->d_name.len, dentry->d_name.name, dentry->d_inode, |