All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, p.raghav@samsung.com,
	hch@infradead.org, john.johansen@canonical.com,
	dhowells@redhat.com, mcgrof@kernel.org
Subject: [RFC 2/3] fs: use SB_NOUSER on path_mount() instead of deprecated MS_NOUSER
Date: Mon,  9 Jan 2023 18:25:53 -0800	[thread overview]
Message-ID: <20230110022554.1186499-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20230110022554.1186499-1-mcgrof@kernel.org>

The goal behind 462ec50cb5 ("VFS: Differentiate mount flags (MS_*) from
internal superblock flags") was to phase out MS_* users for internal
uses. But we can't remove the old MS_* until we have all users out so
just use the SB_* helper for this check.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index ab467ee58341..bf1cc8527057 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -3411,7 +3411,7 @@ int path_mount(const char *dev_name, struct path *path,
 	if (data_page)
 		((char *)data_page)[PAGE_SIZE - 1] = 0;
 
-	if (flags & MS_NOUSER)
+	if (flags & SB_NOUSER)
 		return -EINVAL;
 
 	ret = security_sb_mount(dev_name, path, type_page, flags, data_page);
-- 
2.35.1


  parent reply	other threads:[~2023-01-10  2:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10  2:25 [RFC 0/3] fs: kill old ms_* flags for internal sb Luis Chamberlain
2023-01-10  2:25 ` [RFC 1/3] apparmor: use SB_* flags for private sb flags Luis Chamberlain
2023-01-10 23:40   ` Al Viro
2023-01-10  2:25 ` Luis Chamberlain [this message]
2023-01-10 23:43   ` [RFC 2/3] fs: use SB_NOUSER on path_mount() instead of deprecated MS_NOUSER Al Viro
2023-01-10  2:25 ` [RFC 3/3] fs: remove old MS_* internal flags for the superblock Luis Chamberlain
2023-01-10 23:54   ` Al Viro

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=20230110022554.1186499-3-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=john.johansen@canonical.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=p.raghav@samsung.com \
    --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.