From f930b82d1651fbd9e00d0a96d56c4ba3555b7b41 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 18 Jul 2023 11:17:20 -0700 Subject: [PATCH] FROMLIST: 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 Fixes: 9e6268db496a ("[PATCH] FUSE - read-write operations") Cc: Signed-off-by: Miklos Szeredi Bug: 282905757 Link: https://lore.kernel.org/all/CAJfpegswN_CJJ6C3RZiaK6rpFmNyWmXfaEpnQUJ42KCwNF5tWw@mail.gmail.com/ Signed-off-by: Paul Lawrence (cherry picked from https://android-review.googlesource.com/q/commit:ae5b9259d42efa1bbd42d807fd3b3a991ddb51be) Merged-In: I8c62f5aeeb450de78c6a38a6f8728c900a0fc9bd Change-Id: I8c62f5aeeb450de78c6a38a6f8728c900a0fc9bd --- fs/fuse/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 933e4a727505..076a0bddef8f 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -321,7 +321,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))