fuse: revalidate: don't invalidate if interrupted
commita9d1c4c6df
upstream. If the LOOKUP request triggered from fuse_dentry_revalidate() is interrupted, then the dentry will be invalidated, possibly resulting in submounts being unmounted. Reported-by: Xu Rongbo <xurongbo@baidu.com> Closes: https://lore.kernel.org/all/CAJfpegswN_CJJ6C3RZiaK6rpFmNyWmXfaEpnQUJ42KCwNF5tWw@mail.gmail.com/ Fixes:9e6268db49
("[PATCH] FUSE - read-write operations") Cc: <stable@vger.kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c9060caab4
commit
6ba7ac692a
@ -249,7 +249,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
|
|||||||
spin_unlock(&fi->lock);
|
spin_unlock(&fi->lock);
|
||||||
}
|
}
|
||||||
kfree(forget);
|
kfree(forget);
|
||||||
if (ret == -ENOMEM)
|
if (ret == -ENOMEM || ret == -EINTR)
|
||||||
goto out;
|
goto out;
|
||||||
if (ret || fuse_invalid_attr(&outarg.attr) ||
|
if (ret || fuse_invalid_attr(&outarg.attr) ||
|
||||||
fuse_stale_inode(inode, outarg.generation, &outarg.attr))
|
fuse_stale_inode(inode, outarg.generation, &outarg.attr))
|
||||||
|
Reference in New Issue
Block a user