Skip to contentSkip to conversation

fuse: no interrupt for lookup request

PATCH Miklos Szeredi 2 participants 2 messages Apr 21, 2023 – Apr 23, 2023 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Miklos Szeredi

author maintainer
#1 lore raw
Quoted 6 lines · Xu Rongbo

From: xurongbo <[email protected]>

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 <[email protected]>
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.

Fixes 9e6268db496a ("[PATCH] FUSE - read-write operations")
---
 fs/fuse/dir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/dir.ci renamed from fs/fuse/dir.c +1 -1
@@ -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))
#2 lore raw

I verified, it's OK。

在 2023/4/21 22:48,“Miklos Szeredi”<[email protected] <mailto:[email protected]>> 写入:

Quoted 6 lines · On Mon, 17 Apr 2023 at 09:59, Xu Rongbo <[email protected]…

From: xurongbo <[email protected] <mailto:[email protected]>>

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