[Devel] [PATCH RHEL7 COMMIT] ms/vfs: Undo an overly zealous MS_RDONLY -> SB_RDONLY conversion

Konstantin Khorenko khorenko at virtuozzo.com
Thu Apr 20 21:00:49 MSK 2023


The commit is pushed to "branch-rh7-3.10.0-1160.88.1.vz7.195.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.88.1.vz7.195.2
------>
commit 294a96f5cf72506b92dd8d3d91e6636b239b3b1f
Author: David Howells <dhowells at redhat.com>
Date:   Thu Apr 13 18:47:17 2023 +0800

    ms/vfs: Undo an overly zealous MS_RDONLY -> SB_RDONLY conversion
    
    In do_mount() when the MS_* flags are being converted to MNT_* flags,
    MS_RDONLY got accidentally convered to SB_RDONLY.
    
    Undo this change.
    
    Fixes: e462ec50cb5f ("VFS: Differentiate mount flags (MS_*) from internal superblock flags")
    Signed-off-by: David Howells <dhowells at redhat.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
    
    (cherry picked from commit a9e5b73288cf1595ac2e05cf1acd1924ceea05fa)
    https://jira.sw.ru/browse/PSBM-144416
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    
    =================
    Patchset description:
    mount: Port move_mount_set_group and mount_setattr
    
    We need this as in Virtuozzo criu after rebase to mainstream criu in u20
    we will switch to this new API for sharing group setting accross mounts.
    
    https://jira.vzint.dev/browse/PSBM-144416
---
 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 33ccc11cf327..10e294cb8cda 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -3570,7 +3570,7 @@ long do_mount(const char *dev_name, const char __user *dir_name,
 		mnt_flags |= MNT_NODIRATIME;
 	if (flags & MS_STRICTATIME)
 		mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME);
-	if (flags & SB_RDONLY)
+	if (flags & MS_RDONLY)
 		mnt_flags |= MNT_READONLY;
 
 	/* The default atime for remount is preservation */


More information about the Devel mailing list