summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-07-17 08:45:35 +0100
committerDavid Howells <dhowells@redhat.com>2017-07-17 08:45:35 +0100
commite462ec50cb5fad19f6003a3d8087f4a0945dd2b1 (patch)
tree7e56b715ce6b1c4ad13a4c3cfbce9462efe875bc /init
parentbc98a42c1f7d0f886c0c1b75a92a004976a46d9f (diff)
downloadop-kernel-dev-e462ec50cb5fad19f6003a3d8087f4a0945dd2b1.zip
op-kernel-dev-e462ec50cb5fad19f6003a3d8087f4a0945dd2b1.tar.gz
VFS: Differentiate mount flags (MS_*) from internal superblock flags
Differentiate the MS_* flags passed to mount(2) from the internal flags set in the super_block's s_flags. s_flags are now called SB_*, with the names and the values for the moment mirroring the MS_* flags that they're equivalent to. In this patch, just the headers are altered and some kernel code where blind automated conversion isn't necessarily correct. Note that this shows up some interesting issues: (1) Some MS_* flags get translated to MNT_* flags (such as MS_NODEV -> MNT_NODEV) without passing this on to the filesystem, but some filesystems set such flags anyway. (2) The ->remount_fs() methods of some filesystems adjust the *flags argument by setting MS_* flags in it, such as MS_NOATIME - but these flags are then scrubbed by do_remount_sb() (only the occupants of MS_RMT_MASK are permitted: MS_RDONLY, MS_SYNCHRONOUS, MS_MANDLOCK, MS_I_VERSION and MS_LAZYTIME) I'm not sure what's the best way to solve all these cases. Suggested-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index bf7ea36..f6d4dd7 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -420,8 +420,8 @@ retry:
#endif
panic("VFS: Unable to mount root fs on %s", b);
}
- if (!(flags & MS_RDONLY)) {
- flags |= MS_RDONLY;
+ if (!(flags & SB_RDONLY)) {
+ flags |= SB_RDONLY;
goto retry;
}
OpenPOWER on IntegriCloud