summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2023-06-07 17:49:20 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2023-06-07 17:49:20 +0200
commita9d1c4c6df0e568207907c04aed9e7beb1294c42 (patch)
tree809d0df016eaeef09e808e53a395e3ad3d19831c /fs
parent3066ff93476c35679cb07a97cce37d9bb07632ff (diff)
downloadlinux-stable-a9d1c4c6df0e568207907c04aed9e7beb1294c42.tar.gz
linux-stable-a9d1c4c6df0e568207907c04aed9e7beb1294c42.tar.bz2
linux-stable-a9d1c4c6df0e568207907c04aed9e7beb1294c42.zip
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@baidu.com> Closes: https://lore.kernel.org/all/CAJfpegswN_CJJ6C3RZiaK6rpFmNyWmXfaEpnQUJ42KCwNF5tWw@mail.gmail.com/ Fixes: 9e6268db496a ("[PATCH] FUSE - read-write operations") Cc: <stable@vger.kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fuse/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 5a4a7155cf1c..f67bef9d83c4 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -258,7 +258,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
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))