diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-03-21 13:58:06 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2011-03-21 13:58:06 +0100 |
commit | e7c0a167860620bd2938366896964f729ddaeaaa (patch) | |
tree | 478680f3a309283e5e401cd0867cb7543d7318ff /fs/fuse | |
parent | 19690ddb65dbfc7be1b411fce12d3332acefbfb5 (diff) | |
download | op-kernel-dev-e7c0a167860620bd2938366896964f729ddaeaaa.zip op-kernel-dev-e7c0a167860620bd2938366896964f729ddaeaaa.tar.gz |
fuse: make fuse_dentry_revalidate() RCU aware
Only bail out of fuse_dentry_revalidate() on LOOKUP_RCU when blocking
is actually necessary.
CC: Nick Piggin <npiggin@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 3b84b91..c6ba49b 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -158,10 +158,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) { struct inode *inode; - if (nd && nd->flags & LOOKUP_RCU) - return -ECHILD; - - inode = entry->d_inode; + inode = ACCESS_ONCE(entry->d_inode); if (inode && is_bad_inode(inode)) return 0; else if (fuse_dentry_time(entry) < get_jiffies_64()) { @@ -177,6 +174,9 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) if (!inode) return 0; + if (nd->flags & LOOKUP_RCU) + return -ECHILD; + fc = get_fuse_conn(inode); req = fuse_get_req(fc); if (IS_ERR(req)) |