On Mon, 17 Apr 2023 at 09:59, Xu Rongbo <xurongbo@xxxxxxxxx> wrote: > > From: xurongbo <xurongbo@xxxxxxxxx> > > if lookup request interrupted, then dentry revalidate return -EINTR > will umount bind-mounted directory. > Thanks for the report. Could you please verify that the attached fix also works? Thanks, Miklos
From: Miklos Szeredi <mszeredi@xxxxxxxxxx> Subject: fuse: revalidate: don't invalidate if interrupted 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@xxxxxxxxx> Fixes: 9e6268db496a ("[PATCH] FUSE - read-write operations") Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx> --- fs/fuse/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.ci @@ -258,7 +258,7 @@ static int fuse_dentry_revalidate(struct spin_unlock(&fi->lock); } kfree(forget); - if (ret == -ENOMEM) + if (ret == -ENOMEM || ret == -EINTR) goto out; if (ret || fuse_invalid_attr(&outarg.attr) || fuse_stale_inode(inode, outarg.generation, &outarg.attr))