From: Hongbo Li <lihongbo22@huawei.com>
To: <viro@zeniv.linux.org.uk>, <brauner@kernel.org>, <jack@suse.cz>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH -next] fsconfig: intercept for non-new mount API in advance for FSCONFIG_CMD_CREATE_EXCL
Date: Sat, 11 May 2024 14:08:58 +0800 [thread overview]
Message-ID: <0607f99b-e64f-4e95-8271-1b409e18bcf8@huawei.com> (raw)
In-Reply-To: <20240511040249.2141380-1-lihongbo22@huawei.com>
sorry, please ignore this, and I will revise my code.
On 2024/5/11 12:02, Hongbo Li wrote:
> fsconfig with FSCONFIG_CMD_CREATE_EXCL command requires the new mount api,
> here we should return -EOPNOTSUPP in advance to avoid extra procedure.
>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
> ---
> fs/fsopen.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/fsopen.c b/fs/fsopen.c
> index 6593ae518115..880eea7a30fd 100644
> --- a/fs/fsopen.c
> +++ b/fs/fsopen.c
> @@ -220,10 +220,6 @@ static int vfs_cmd_create(struct fs_context *fc, bool exclusive)
> if (!mount_capable(fc))
> return -EPERM;
>
> - /* require the new mount api */
> - if (exclusive && fc->ops == &legacy_fs_context_ops)
> - return -EOPNOTSUPP;
> -
> fc->phase = FS_CONTEXT_CREATING;
> fc->exclusive = exclusive;
>
> @@ -411,6 +407,7 @@ SYSCALL_DEFINE5(fsconfig,
> case FSCONFIG_SET_PATH:
> case FSCONFIG_SET_PATH_EMPTY:
> case FSCONFIG_SET_FD:
> + case FSCONFIG_CMD_CREATE_EXEC:
FSCONFIG_CMD_CREATE_EXCL
> ret = -EOPNOTSUPP;
> goto out_f;
> }
next prev parent reply other threads:[~2024-05-11 6:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-11 4:02 [PATCH -next] fsconfig: intercept for non-new mount API in advance for FSCONFIG_CMD_CREATE_EXCL Hongbo Li
2024-05-11 6:08 ` Hongbo Li [this message]
2024-05-12 13:12 ` kernel test robot
2024-05-12 13:25 ` kernel test robot
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=0607f99b-e64f-4e95-8271-1b409e18bcf8@huawei.com \
--to=lihongbo22@huawei.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox