Skip to content

Commit

Permalink
fuse: make fuse_dentry_revalidate() RCU aware
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miklos Szeredi committed Mar 21, 2011
1 parent 19690dd commit e7c0a16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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))
Expand Down

0 comments on commit e7c0a16

Please sign in to comment.