All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Xu Rongbo <xurongbo@baidu.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [PATCH] fuse: no interrupt for lookup request
Date: Fri, 21 Apr 2023 16:47:06 +0200	[thread overview]
Message-ID: <CAJfpegswN_CJJ6C3RZiaK6rpFmNyWmXfaEpnQUJ42KCwNF5tWw@mail.gmail.com> (raw)
In-Reply-To: <20230417075545.58817-1-xurongbo@baidu.com>

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

On Mon, 17 Apr 2023 at 09:59, Xu Rongbo <xurongbo@baidu.com> wrote:
>
> From: xurongbo <xurongbo@baidu.com>
>
> 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

[-- Attachment #2: fuse-dont-invalidatate-if-interrupted.patch --]
[-- Type: text/x-patch, Size: 875 bytes --]

From: Miklos Szeredi <mszeredi@redhat.com>
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@baidu.com>
Fixes: 9e6268db496a ("[PATCH] FUSE - read-write operations")
Cc: <stable@vger.kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
 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))

       reply	other threads:[~2023-04-21 14:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230417075545.58817-1-xurongbo@baidu.com>
2023-04-21 14:47 ` Miklos Szeredi [this message]
2023-04-23  4:27   ` [PATCH] [PATCH] fuse: no interrupt for lookup request Xu,Rongbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJfpegswN_CJJ6C3RZiaK6rpFmNyWmXfaEpnQUJ42KCwNF5tWw@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xurongbo@baidu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.