Commit e7c0a167 authored by Miklos Szeredi's avatar Miklos Szeredi

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: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 19690ddb
...@@ -158,10 +158,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) ...@@ -158,10 +158,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
{ {
struct inode *inode; struct inode *inode;
if (nd && nd->flags & LOOKUP_RCU) inode = ACCESS_ONCE(entry->d_inode);
return -ECHILD;
inode = entry->d_inode;
if (inode && is_bad_inode(inode)) if (inode && is_bad_inode(inode))
return 0; return 0;
else if (fuse_dentry_time(entry) < get_jiffies_64()) { else if (fuse_dentry_time(entry) < get_jiffies_64()) {
...@@ -177,6 +174,9 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) ...@@ -177,6 +174,9 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
if (!inode) if (!inode)
return 0; return 0;
if (nd->flags & LOOKUP_RCU)
return -ECHILD;
fc = get_fuse_conn(inode); fc = get_fuse_conn(inode);
req = fuse_get_req(fc); req = fuse_get_req(fc);
if (IS_ERR(req)) if (IS_ERR(req))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment