mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 14:52:05 +00:00
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>
This commit is contained in:
parent
19690ddb65
commit
e7c0a16786
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user