linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH 14/14] vboxsf: Convert to new uid/gid option parsing helpers
Date: Fri, 28 Jun 2024 08:43:30 +0200	[thread overview]
Message-ID: <96824bd3-b827-429e-ac6a-2b30bb903cd0@redhat.com> (raw)
In-Reply-To: <58862d35-a026-4866-ab7f-fa09dda8ac1f@redhat.com>

Hi,

On 6/28/24 2:42 AM, Eric Sandeen wrote:
> Convert to new uid/gid option parsing helpers
> 
> From: Eric Sandeen <sandeen@redhat.com>
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Please feel free to take this upstream through whatever
tree/branch is convenient.

Regards,

Hans

> ---
>  fs/vboxsf/super.c | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c
> index ffb1d565da39..e95b8a48d8a0 100644
> --- a/fs/vboxsf/super.c
> +++ b/fs/vboxsf/super.c
> @@ -41,8 +41,8 @@ enum  { opt_nls, opt_uid, opt_gid, opt_ttl, opt_dmode, opt_fmode,
>  
>  static const struct fs_parameter_spec vboxsf_fs_parameters[] = {
>  	fsparam_string	("nls",		opt_nls),
> -	fsparam_u32	("uid",		opt_uid),
> -	fsparam_u32	("gid",		opt_gid),
> +	fsparam_uid	("uid",		opt_uid),
> +	fsparam_gid	("gid",		opt_gid),
>  	fsparam_u32	("ttl",		opt_ttl),
>  	fsparam_u32oct	("dmode",	opt_dmode),
>  	fsparam_u32oct	("fmode",	opt_fmode),
> @@ -55,8 +55,6 @@ static int vboxsf_parse_param(struct fs_context *fc, struct fs_parameter *param)
>  {
>  	struct vboxsf_fs_context *ctx = fc->fs_private;
>  	struct fs_parse_result result;
> -	kuid_t uid;
> -	kgid_t gid;
>  	int opt;
>  
>  	opt = fs_parse(fc, vboxsf_fs_parameters, param, &result);
> @@ -73,16 +71,10 @@ static int vboxsf_parse_param(struct fs_context *fc, struct fs_parameter *param)
>  		param->string = NULL;
>  		break;
>  	case opt_uid:
> -		uid = make_kuid(current_user_ns(), result.uint_32);
> -		if (!uid_valid(uid))
> -			return -EINVAL;
> -		ctx->o.uid = uid;
> +		ctx->o.uid = result.uid;
>  		break;
>  	case opt_gid:
> -		gid = make_kgid(current_user_ns(), result.uint_32);
> -		if (!gid_valid(gid))
> -			return -EINVAL;
> -		ctx->o.gid = gid;
> +		ctx->o.gid = result.gid;
>  		break;
>  	case opt_ttl:
>  		ctx->o.ttl = msecs_to_jiffies(result.uint_32);


  reply	other threads:[~2024-06-28  6:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28  0:24 [PATCH 0/14] New uid & gid mount option parsing helpers Eric Sandeen
2024-06-28  0:26 ` [PATCH 01/14] fs_parse: add uid & gid option " Eric Sandeen
2024-06-28  9:45   ` Jan Kara
2024-06-28 12:23     ` Christian Brauner
2024-07-01  9:34       ` Jan Kara
2024-06-28 13:44     ` Eric Sandeen
2024-06-28  0:27 ` [PATCH 02/14] autofs: Convert to new uid/gid " Eric Sandeen
2024-07-01  3:05   ` Ian Kent
2024-06-28  0:29 ` [PATCH 03/14] debugfs: " Eric Sandeen
2024-06-28  0:30 ` [PATCH 04/14] efivarfs: " Eric Sandeen
2024-06-28  0:31 ` [PATCH 05/14] exfat: " Eric Sandeen
2024-06-28  0:32 ` [PATCH 06/14] ext4: " Eric Sandeen
2024-06-28  0:33 ` [PATCH 07/14] fuse: " Eric Sandeen
2024-06-28 12:07   ` Christian Brauner
2024-06-28 13:41     ` Eric Sandeen
2024-06-28  0:35 ` [PATCH 08/14] hugetlbfs: " Eric Sandeen
2024-06-28  0:36 ` [PATCH 09/14] isofs: " Eric Sandeen
2024-06-28  0:37 ` [PATCH 10/14] ntfs3: " Eric Sandeen
2024-06-28  0:38 ` [PATCH 11/14] tmpfs: " Eric Sandeen
2024-06-28  0:39 ` [PATCH 12/14] smb: client: " Eric Sandeen
2024-06-28  0:40 ` [PATCH 13/14] tracefs: " Eric Sandeen
2024-06-28 12:35   ` Steven Rostedt
2024-06-28  0:42 ` [PATCH 14/14] vboxsf: " Eric Sandeen
2024-06-28  6:43   ` Hans de Goede [this message]
2024-06-28 11:51 ` [PATCH 0/14] New uid & gid mount " Christian Brauner
2024-07-02  4:25 ` (subset) " Christian Brauner

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=96824bd3-b827-429e-ac6a-2b30bb903cd0@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sandeen@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).