From: Christian Brauner <brauner@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>,
Jeff Layton <jlayton@kernel.org>,
Lennart Poettering <lennart@poettering.net>,
Daan De Meyer <daan.j.demeyer@gmail.com>,
Seth Forshee <sforshee@kernel.org>
Subject: Re: [PATCH 3/4] samples/vfs: check whether flag was raised
Date: Thu, 30 Jan 2025 16:17:13 +0100 [thread overview]
Message-ID: <20250130-anlegen-lohnkampf-cf37a585cbf9@brauner> (raw)
In-Reply-To: <CAJfpegsVCPfCn2DpM8iiYSS5DpMsLB8QBUCHecoj6s0Vxf4jzg@mail.gmail.com>
On Thu, Jan 30, 2025 at 09:45:50AM +0100, Miklos Szeredi wrote:
> On Thu, 30 Jan 2025 at 00:20, Christian Brauner <brauner@kernel.org> wrote:
> >
> > For string options the kernel will raise the corresponding flag only if
> > the string isn't empty. So check for the flag.
>
> Hmm, seems like this is going to be a common mistake.
Probably.
>
> How about just putting a nul char at sm->str, which will solve this
> once and for all (any unset str_ offset will point to this empty
> string)?
Agreed.
>
> Then we can say that instead of checking the mask for a string it's
> okay to rely on it being empty by default.
Right, but I do prefer checking whether the flag is raised or not. But
we can just support both.
next prev parent reply other threads:[~2025-01-30 15:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 23:19 [PATCH 0/4] statmount: allow to retrieve idmappings Christian Brauner
2025-01-29 23:19 ` [PATCH 1/4] uidgid: add map_id_range_up() Christian Brauner
2025-01-29 23:19 ` [PATCH 2/4] statmount: allow to retrieve idmappings Christian Brauner
2025-01-30 12:37 ` Jeff Layton
2025-01-29 23:19 ` [PATCH 3/4] samples/vfs: check whether flag was raised Christian Brauner
2025-01-30 8:45 ` Miklos Szeredi
2025-01-30 15:17 ` Christian Brauner [this message]
2025-01-29 23:19 ` [PATCH 4/4] samples/vfs: add STATMOUNT_MNT_{G,U}IDMAP Christian Brauner
2025-01-30 12:22 ` [PATCH 0/4] statmount: allow to retrieve idmappings Jeff Layton
2025-01-30 15:16 ` 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=20250130-anlegen-lohnkampf-cf37a585cbf9@brauner \
--to=brauner@kernel.org \
--cc=daan.j.demeyer@gmail.com \
--cc=jlayton@kernel.org \
--cc=josef@toxicpanda.com \
--cc=lennart@poettering.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=sforshee@kernel.org \
/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