From: Greg KH <gregkh@linuxfoundation.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Christian Brauner <christian.brauner@ubuntu.com>,
viro@zeniv.linux.org.uk, tglx@linutronix.de,
kstewart@linuxfoundation.org, pombredanne@nexb.com,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
serge@hallyn.com
Subject: Re: [PATCH 1/6] fs: use << for MS_* flags
Date: Fri, 13 Apr 2018 22:19:46 +0200 [thread overview]
Message-ID: <20180413201946.GA22641@kroah.com> (raw)
In-Reply-To: <f738679f-bc7e-3356-b278-ff881f6f651a@infradead.org>
On Fri, Apr 13, 2018 at 09:45:01AM -0700, Randy Dunlap wrote:
> On 04/13/2018 09:11 AM, Christian Brauner wrote:
> > Consistenly use << to define MS_* constants.
> >
> > Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
> > ---
> > include/uapi/linux/fs.h | 33 +++++++++++++++++----------------
> > 1 file changed, 17 insertions(+), 16 deletions(-)
> >
> > diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
> > index d2a8313fabd7..9662790a657c 100644
> > --- a/include/uapi/linux/fs.h
> > +++ b/include/uapi/linux/fs.h
> > @@ -105,22 +105,23 @@ struct inodes_stat_t {
> > /*
> > * These are the fs-independent mount-flags: up to 32 flags are supported
> > */
> > -#define MS_RDONLY 1 /* Mount read-only */
> > -#define MS_NOSUID 2 /* Ignore suid and sgid bits */
> > -#define MS_NODEV 4 /* Disallow access to device special files */
> > -#define MS_NOEXEC 8 /* Disallow program execution */
> > -#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
> > -#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
> > -#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
> > -#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
> > -#define MS_NOATIME 1024 /* Do not update access times. */
> > -#define MS_NODIRATIME 2048 /* Do not update directory access times */
> > -#define MS_BIND 4096
> > -#define MS_MOVE 8192
> > -#define MS_REC 16384
> > -#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence.
> > - MS_VERBOSE is deprecated. */
> > -#define MS_SILENT 32768
> > +#define MS_RDONLY (1<<0) /* Mount read-only */
>
> Why not just use BIT(n) instead?
>
> #include <linux/bitops.h>
>
> #define MS_RDONLY BIT(0) /* Mount read-only */
BIT() is not exported to uapi files :(
next prev parent reply other threads:[~2018-04-13 20:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-13 16:11 [PATCH 0/6] statfs: handle mount propagation Christian Brauner
2018-04-13 16:11 ` [PATCH 1/6] fs: use << for MS_* flags Christian Brauner
2018-04-13 16:45 ` Randy Dunlap
2018-04-13 20:19 ` Greg KH [this message]
2018-04-13 16:11 ` [PATCH 2/6] statfs: use << to align with fs header Christian Brauner
2018-04-13 16:47 ` Randy Dunlap
2018-04-13 17:35 ` Andreas Dilger
2018-04-13 17:55 ` Randy Dunlap
2018-04-13 18:32 ` Christian Brauner
2018-04-13 16:11 ` [PATCH 3/6] statfs: add ST_UNBINDABLE Christian Brauner
2018-04-13 16:11 ` [PATCH 4/6] statfs: add ST_SHARED Christian Brauner
2018-04-13 16:11 ` [PATCH 5/6] statfs: add ST_PRIVATE Christian Brauner
2018-04-13 16:11 ` [PATCH 6/6] statfs: add ST_SLAVE 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=20180413201946.GA22641@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=christian.brauner@ubuntu.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=rdunlap@infradead.org \
--cc=serge@hallyn.com \
--cc=tglx@linutronix.de \
--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 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.