summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-27 16:05:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-27 16:05:09 -0500
commit1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e (patch)
tree83c57e4aeda0665cb131de862364b7a5cfd7dd66
parent141cbfba1d0502006463aa80f57c64086226af1a (diff)
Rename superblock flags (MS_xyz -> SB_xyz)
This is a pure automated search-and-replace of the internal kernel superblock flags. The s_flags are now called SB_*, with the names and the values for the moment mirroring the MS_* flags that they're equivalent to. Note how the MS_xyz flags are the ones passed to the mount system call, while the SB_xyz flags are what we then use in sb->s_flags. The script to do this was: # places to look in; re security/*: it generally should *not* be # touched (that stuff parses mount(2) arguments directly), but # there are two places where we really deal with superblock flags. FILES="drivers/mtd drivers/staging/lustre fs ipc mm \ include/linux/fs.h include/uapi/linux/bfs_fs.h \ security/apparmor/apparmorfs.c security/apparmor/include/lib.h" # the list of MS_... constants SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \ DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \ POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \ I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \ ACTIVE NOUSER" SED_PROG= for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done # we want files that contain at least one of MS_..., # with fs/namespace.c and fs/pnode.c excluded. L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c') for f in $L; do sed -i $f $SED_PROG; done Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/mtd/mtdsuper.c6
-rw-r--r--drivers/staging/lustre/lustre/llite/file.c2
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_lib.c14
-rw-r--r--fs/9p/vfs_super.c6
-rw-r--r--fs/adfs/super.c4
-rw-r--r--fs/affs/amigaffs.c2
-rw-r--r--fs/affs/bitmap.c6
-rw-r--r--fs/affs/super.c16
-rw-r--r--fs/afs/super.c4
-rw-r--r--fs/befs/ChangeLog2
-rw-r--r--fs/befs/linuxvfs.c4
-rw-r--r--fs/btrfs/ctree.h2
-rw-r--r--fs/btrfs/extent_io.c2
-rw-r--r--fs/btrfs/ioctl.c4
-rw-r--r--fs/btrfs/super.c50
-rw-r--r--fs/btrfs/volumes.c4
-rw-r--r--fs/ceph/super.c8
-rw-r--r--fs/cifs/cifs_fs_sb.h2
-rw-r--r--fs/cifs/cifsfs.c12
-rw-r--r--fs/cifs/cifsglob.h4
-rw-r--r--fs/cifs/inode.c2
-rw-r--r--fs/cifs/xattr.c8
-rw-r--r--fs/coda/inode.c4
-rw-r--r--fs/cramfs/inode.c4
-rw-r--r--fs/ecryptfs/main.c8
-rw-r--r--fs/efs/super.c4
-rw-r--r--fs/ext2/balloc.c4
-rw-r--r--fs/ext2/ialloc.c4
-rw-r--r--fs/ext2/super.c20
-rw-r--r--fs/ext4/inode.c4
-rw-r--r--fs/ext4/super.c52
-rw-r--r--fs/f2fs/checkpoint.c10
-rw-r--r--fs/f2fs/f2fs.h2
-rw-r--r--fs/f2fs/gc.c2
-rw-r--r--fs/f2fs/recovery.c10
-rw-r--r--fs/f2fs/super.c28
-rw-r--r--fs/fat/fatent.c6
-rw-r--r--fs/fat/inode.c8
-rw-r--r--fs/fat/misc.c2
-rw-r--r--fs/fat/namei_msdos.c2
-rw-r--r--fs/freevxfs/vxfs_super.c4
-rw-r--r--fs/fs-writeback.c2
-rw-r--r--fs/fuse/inode.c12
-rw-r--r--fs/gfs2/ops_fstype.c16
-rw-r--r--fs/gfs2/super.c10
-rw-r--r--fs/gfs2/trans.c2
-rw-r--r--fs/hfs/mdb.c4
-rw-r--r--fs/hfs/super.c16
-rw-r--r--fs/hfsplus/super.c22
-rw-r--r--fs/hpfs/map.c2
-rw-r--r--fs/hpfs/super.c8
-rw-r--r--fs/inode.c10
-rw-r--r--fs/isofs/inode.c2
-rw-r--r--fs/jffs2/fs.c4
-rw-r--r--fs/jffs2/os-linux.h2
-rw-r--r--fs/jffs2/super.c4
-rw-r--r--fs/jfs/super.c10
-rw-r--r--fs/kernfs/mount.c2
-rw-r--r--fs/libfs.c6
-rw-r--r--fs/locks.c2
-rw-r--r--fs/minix/inode.c4
-rw-r--r--fs/ncpfs/inode.c4
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/nfs/inode.c2
-rw-r--r--fs/nfs/internal.h2
-rw-r--r--fs/nfs/super.c22
-rw-r--r--fs/nilfs2/segment.c2
-rw-r--r--fs/nilfs2/super.c24
-rw-r--r--fs/nilfs2/the_nilfs.c6
-rw-r--r--fs/notify/fsnotify.c2
-rw-r--r--fs/nsfs.c2
-rw-r--r--fs/ntfs/super.c32
-rw-r--r--fs/ocfs2/file.c2
-rw-r--r--fs/ocfs2/super.c28
-rw-r--r--fs/ocfs2/xattr.c2
-rw-r--r--fs/openpromfs/inode.c4
-rw-r--r--fs/orangefs/super.c8
-rw-r--r--fs/overlayfs/super.c10
-rw-r--r--fs/proc/inode.c2
-rw-r--r--fs/proc/root.c2
-rw-r--r--fs/proc_namespace.c8
-rw-r--r--fs/qnx4/inode.c4
-rw-r--r--fs/qnx6/inode.c4
-rw-r--r--fs/reiserfs/inode.c2
-rw-r--r--fs/reiserfs/journal.c6
-rw-r--r--fs/reiserfs/prints.c4
-rw-r--r--fs/reiserfs/super.c18
-rw-r--r--fs/reiserfs/xattr.c10
-rw-r--r--fs/romfs/super.c4
-rw-r--r--fs/squashfs/super.c4
-rw-r--r--fs/statfs.c6
-rw-r--r--fs/sysfs/mount.c2
-rw-r--r--fs/sysv/inode.c2
-rw-r--r--fs/sysv/super.c2
-rw-r--r--fs/ubifs/file.c2
-rw-r--r--fs/ubifs/io.c2
-rw-r--r--fs/ubifs/super.c20
-rw-r--r--fs/ubifs/ubifs.h4
-rw-r--r--fs/udf/super.c6
-rw-r--r--fs/ufs/balloc.c8
-rw-r--r--fs/ufs/ialloc.c10
-rw-r--r--fs/ufs/super.c30
-rw-r--r--fs/xfs/xfs_log.c6
-rw-r--r--fs/xfs/xfs_super.c8
-rw-r--r--fs/xfs/xfs_super.h2
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/uapi/linux/bfs_fs.h2
-rw-r--r--ipc/mqueue.c2
-rw-r--r--mm/shmem.c10
-rw-r--r--security/apparmor/apparmorfs.c2
-rw-r--r--security/apparmor/include/lib.h2
111 files changed, 417 insertions, 417 deletions
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c
index e43fea896d1e..d58a61c09304 100644
--- a/drivers/mtd/mtdsuper.c
+++ b/drivers/mtd/mtdsuper.c
@@ -79,14 +79,14 @@ static struct dentry *mount_mtd_aux(struct file_system_type *fs_type, int flags,
79 pr_debug("MTDSB: New superblock for device %d (\"%s\")\n", 79 pr_debug("MTDSB: New superblock for device %d (\"%s\")\n",
80 mtd->index, mtd->name); 80 mtd->index, mtd->name);
81 81
82 ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); 82 ret = fill_super(sb, data, flags & SB_SILENT ? 1 : 0);
83 if (ret < 0) { 83 if (ret < 0) {
84 deactivate_locked_super(sb); 84 deactivate_locked_super(sb);
85 return ERR_PTR(ret); 85 return ERR_PTR(ret);
86 } 86 }
87 87
88 /* go */ 88 /* go */
89 sb->s_flags |= MS_ACTIVE; 89 sb->s_flags |= SB_ACTIVE;
90 return dget(sb->s_root); 90 return dget(sb->s_root);
91 91
92 /* new mountpoint for an already mounted superblock */ 92 /* new mountpoint for an already mounted superblock */
@@ -202,7 +202,7 @@ struct dentry *mount_mtd(struct file_system_type *fs_type, int flags,
202not_an_MTD_device: 202not_an_MTD_device:
203#endif /* CONFIG_BLOCK */ 203#endif /* CONFIG_BLOCK */
204 204
205 if (!(flags & MS_SILENT)) 205 if (!(flags & SB_SILENT))
206 printk(KERN_NOTICE 206 printk(KERN_NOTICE
207 "MTD: Attempt to mount non-MTD device \"%s\"\n", 207 "MTD: Attempt to mount non-MTD device \"%s\"\n",
208 dev_name); 208 dev_name);
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 2d6e64dea266..938b859b6650 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -1016,7 +1016,7 @@ static bool file_is_noatime(const struct file *file)
1016 if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)) 1016 if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
1017 return true; 1017 return true;
1018 1018
1019 if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) 1019 if ((inode->i_sb->s_flags & SB_NODIRATIME) && S_ISDIR(inode->i_mode))
1020 return true; 1020 return true;
1021 1021
1022 return false; 1022 return false;
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 65ac5128f005..8666f1e81ade 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -313,11 +313,11 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
313 } 313 }
314 314
315 if (data->ocd_connect_flags & OBD_CONNECT_ACL) { 315 if (data->ocd_connect_flags & OBD_CONNECT_ACL) {
316 sb->s_flags |= MS_POSIXACL; 316 sb->s_flags |= SB_POSIXACL;
317 sbi->ll_flags |= LL_SBI_ACL; 317 sbi->ll_flags |= LL_SBI_ACL;
318 } else { 318 } else {
319 LCONSOLE_INFO("client wants to enable acl, but mdt not!\n"); 319 LCONSOLE_INFO("client wants to enable acl, but mdt not!\n");
320 sb->s_flags &= ~MS_POSIXACL; 320 sb->s_flags &= ~SB_POSIXACL;
321 sbi->ll_flags &= ~LL_SBI_ACL; 321 sbi->ll_flags &= ~LL_SBI_ACL;
322 } 322 }
323 323
@@ -660,7 +660,7 @@ void ll_kill_super(struct super_block *sb)
660 struct ll_sb_info *sbi; 660 struct ll_sb_info *sbi;
661 661
662 /* not init sb ?*/ 662 /* not init sb ?*/
663 if (!(sb->s_flags & MS_ACTIVE)) 663 if (!(sb->s_flags & SB_ACTIVE))
664 return; 664 return;
665 665
666 sbi = ll_s2sbi(sb); 666 sbi = ll_s2sbi(sb);
@@ -2039,8 +2039,8 @@ int ll_remount_fs(struct super_block *sb, int *flags, char *data)
2039 int err; 2039 int err;
2040 __u32 read_only; 2040 __u32 read_only;
2041 2041
2042 if ((bool)(*flags & MS_RDONLY) != sb_rdonly(sb)) { 2042 if ((bool)(*flags & SB_RDONLY) != sb_rdonly(sb)) {
2043 read_only = *flags & MS_RDONLY; 2043 read_only = *flags & SB_RDONLY;
2044 err = obd_set_info_async(NULL, sbi->ll_md_exp, 2044 err = obd_set_info_async(NULL, sbi->ll_md_exp,
2045 sizeof(KEY_READ_ONLY), 2045 sizeof(KEY_READ_ONLY),
2046 KEY_READ_ONLY, sizeof(read_only), 2046 KEY_READ_ONLY, sizeof(read_only),
@@ -2053,9 +2053,9 @@ int ll_remount_fs(struct super_block *sb, int *flags, char *data)
2053 } 2053 }
2054 2054
2055 if (read_only) 2055 if (read_only)
2056 sb->s_flags |= MS_RDONLY; 2056 sb->s_flags |= SB_RDONLY;
2057 else 2057 else
2058 sb->s_flags &= ~MS_RDONLY; 2058 sb->s_flags &= ~SB_RDONLY;
2059 2059
2060 if (sbi->ll_flags & LL_SBI_VERBOSE) 2060 if (sbi->ll_flags & LL_SBI_VERBOSE)
2061 LCONSOLE_WARN("Remounted %s %s\n", profilenm, 2061 LCONSOLE_WARN("Remounted %s %s\n", profilenm,
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 8b75463cb211..af03c2a901eb 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -94,13 +94,13 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
94 if (v9ses->cache) 94 if (v9ses->cache)
95 sb->s_bdi->ra_pages = (VM_MAX_READAHEAD * 1024)/PAGE_SIZE; 95 sb->s_bdi->ra_pages = (VM_MAX_READAHEAD * 1024)/PAGE_SIZE;
96 96
97 sb->s_flags |= MS_ACTIVE | MS_DIRSYNC | MS_NOATIME; 97 sb->s_flags |= SB_ACTIVE | SB_DIRSYNC | SB_NOATIME;
98 if (!v9ses->cache) 98 if (!v9ses->cache)
99 sb->s_flags |= MS_SYNCHRONOUS; 99 sb->s_flags |= SB_SYNCHRONOUS;
100 100
101#ifdef CONFIG_9P_FS_POSIX_ACL 101#ifdef CONFIG_9P_FS_POSIX_ACL
102 if ((v9ses->flags & V9FS_ACL_MASK) == V9FS_POSIX_ACL) 102 if ((v9ses->flags & V9FS_ACL_MASK) == V9FS_POSIX_ACL)
103 sb->s_flags |= MS_POSIXACL; 103 sb->s_flags |= SB_POSIXACL;
104#endif 104#endif
105 105
106 return 0; 106 return 0;
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index c9fdfb112933..cfda2c7caedc 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -213,7 +213,7 @@ static int parse_options(struct super_block *sb, char *options)
213static int adfs_remount(struct super_block *sb, int *flags, char *data) 213static int adfs_remount(struct super_block *sb, int *flags, char *data)
214{ 214{
215 sync_filesystem(sb); 215 sync_filesystem(sb);
216 *flags |= MS_NODIRATIME; 216 *flags |= SB_NODIRATIME;
217 return parse_options(sb, data); 217 return parse_options(sb, data);
218} 218}
219 219
@@ -372,7 +372,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
372 struct inode *root; 372 struct inode *root;
373 int ret = -EINVAL; 373 int ret = -EINVAL;
374 374
375 sb->s_flags |= MS_NODIRATIME; 375 sb->s_flags |= SB_NODIRATIME;
376 376
377 asb = kzalloc(sizeof(*asb), GFP_KERNEL); 377 asb = kzalloc(sizeof(*asb), GFP_KERNEL);
378 if (!asb) 378 if (!asb)
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 185d5ab7e986..0f0e6925e97d 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -453,7 +453,7 @@ affs_error(struct super_block *sb, const char *function, const char *fmt, ...)
453 pr_crit("error (device %s): %s(): %pV\n", sb->s_id, function, &vaf); 453 pr_crit("error (device %s): %s(): %pV\n", sb->s_id, function, &vaf);
454 if (!sb_rdonly(sb)) 454 if (!sb_rdonly(sb))
455 pr_warn("Remounting filesystem read-only\n"); 455 pr_warn("Remounting filesystem read-only\n");
456 sb->s_flags |= MS_RDONLY; 456 sb->s_flags |= SB_RDONLY;
457 va_end(args); 457 va_end(args);
458} 458}
459 459
diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c
index 2b1399611d9e..5ba9ef2742f6 100644
--- a/fs/affs/bitmap.c
+++ b/fs/affs/bitmap.c
@@ -250,12 +250,12 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
250 int i, res = 0; 250 int i, res = 0;
251 struct affs_sb_info *sbi = AFFS_SB(sb); 251 struct affs_sb_info *sbi = AFFS_SB(sb);
252 252
253 if (*flags & MS_RDONLY) 253 if (*flags & SB_RDONLY)
254 return 0; 254 return 0;
255 255
256 if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) { 256 if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) {
257 pr_notice("Bitmap invalid - mounting %s read only\n", sb->s_id); 257 pr_notice("Bitmap invalid - mounting %s read only\n", sb->s_id);
258 *flags |= MS_RDONLY; 258 *flags |= SB_RDONLY;
259 return 0; 259 return 0;
260 } 260 }
261 261
@@ -288,7 +288,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
288 if (affs_checksum_block(sb, bh)) { 288 if (affs_checksum_block(sb, bh)) {
289 pr_warn("Bitmap %u invalid - mounting %s read only.\n", 289 pr_warn("Bitmap %u invalid - mounting %s read only.\n",
290 bm->bm_key, sb->s_id); 290 bm->bm_key, sb->s_id);
291 *flags |= MS_RDONLY; 291 *flags |= SB_RDONLY;
292 goto out; 292 goto out;
293 } 293 }
294 pr_debug("read bitmap block %d: %d\n", blk, bm->bm_key); 294 pr_debug("read bitmap block %d: %d\n", blk, bm->bm_key);
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 884bedab7266..1117e36134cc 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -356,7 +356,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
356 356
357 sb->s_magic = AFFS_SUPER_MAGIC; 357 sb->s_magic = AFFS_SUPER_MAGIC;
358 sb->s_op = &affs_sops; 358 sb->s_op = &affs_sops;
359 sb->s_flags |= MS_NODIRATIME; 359 sb->s_flags |= SB_NODIRATIME;
360 360
361 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); 361 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL);
362 if (!sbi) 362 if (!sbi)
@@ -466,7 +466,7 @@ got_root:
466 if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS 466 if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS
467 || chksum == MUFS_DCOFS) && !sb_rdonly(sb)) { 467 || chksum == MUFS_DCOFS) && !sb_rdonly(sb)) {
468 pr_notice("Dircache FS - mounting %s read only\n", sb->s_id); 468 pr_notice("Dircache FS - mounting %s read only\n", sb->s_id);
469 sb->s_flags |= MS_RDONLY; 469 sb->s_flags |= SB_RDONLY;
470 } 470 }
471 switch (chksum) { 471 switch (chksum) {
472 case MUFS_FS: 472 case MUFS_FS:
@@ -488,7 +488,7 @@ got_root:
488 /* fall thru */ 488 /* fall thru */
489 case FS_OFS: 489 case FS_OFS:
490 affs_set_opt(sbi->s_flags, SF_OFS); 490 affs_set_opt(sbi->s_flags, SF_OFS);
491 sb->s_flags |= MS_NOEXEC; 491 sb->s_flags |= SB_NOEXEC;
492 break; 492 break;
493 case MUFS_DCOFS: 493 case MUFS_DCOFS:
494 case MUFS_INTLOFS: 494 case MUFS_INTLOFS:
@@ -497,7 +497,7 @@ got_root:
497 case FS_INTLOFS: 497 case FS_INTLOFS:
498 affs_set_opt(sbi->s_flags, SF_INTL); 498 affs_set_opt(sbi->s_flags, SF_INTL);
499 affs_set_opt(sbi->s_flags, SF_OFS); 499 affs_set_opt(sbi->s_flags, SF_OFS);
500 sb->s_flags |= MS_NOEXEC; 500 sb->s_flags |= SB_NOEXEC;
501 break; 501 break;
502 default: 502 default:
503 pr_err("Unknown filesystem on device %s: %08X\n", 503 pr_err("Unknown filesystem on device %s: %08X\n",
@@ -513,7 +513,7 @@ got_root:
513 sig, sig[3] + '0', blocksize); 513 sig, sig[3] + '0', blocksize);
514 } 514 }
515 515
516 sb->s_flags |= MS_NODEV | MS_NOSUID; 516 sb->s_flags |= SB_NODEV | SB_NOSUID;
517 517
518 sbi->s_data_blksize = sb->s_blocksize; 518 sbi->s_data_blksize = sb->s_blocksize;
519 if (affs_test_opt(sbi->s_flags, SF_OFS)) 519 if (affs_test_opt(sbi->s_flags, SF_OFS))
@@ -570,7 +570,7 @@ affs_remount(struct super_block *sb, int *flags, char *data)
570 pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data); 570 pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data);
571 571
572 sync_filesystem(sb); 572 sync_filesystem(sb);
573 *flags |= MS_NODIRATIME; 573 *flags |= SB_NODIRATIME;
574 574
575 memcpy(volume, sbi->s_volume, 32); 575 memcpy(volume, sbi->s_volume, 32);
576 if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block, 576 if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block,
@@ -596,10 +596,10 @@ affs_remount(struct super_block *sb, int *flags, char *data)
596 memcpy(sbi->s_volume, volume, 32); 596 memcpy(sbi->s_volume, volume, 32);
597 spin_unlock(&sbi->symlink_lock); 597 spin_unlock(&sbi->symlink_lock);
598 598
599 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 599 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
600 return 0; 600 return 0;
601 601
602 if (*flags & MS_RDONLY) 602 if (*flags & SB_RDONLY)
603 affs_free_bitmap(sb); 603 affs_free_bitmap(sb);
604 else 604 else
605 res = affs_init_bitmap(sb, flags); 605 res = affs_init_bitmap(sb, flags);
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 875b5eb02242..d3f97da61bdf 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -496,10 +496,10 @@ static struct dentry *afs_mount(struct file_system_type *fs_type,
496 if (ret < 0) 496 if (ret < 0)
497 goto error_sb; 497 goto error_sb;
498 as = NULL; 498 as = NULL;
499 sb->s_flags |= MS_ACTIVE; 499 sb->s_flags |= SB_ACTIVE;
500 } else { 500 } else {
501 _debug("reuse"); 501 _debug("reuse");
502 ASSERTCMP(sb->s_flags, &, MS_ACTIVE); 502 ASSERTCMP(sb->s_flags, &, SB_ACTIVE);
503 afs_destroy_sbi(as); 503 afs_destroy_sbi(as);
504 as = NULL; 504 as = NULL;
505 } 505 }
diff --git a/fs/befs/ChangeLog b/fs/befs/ChangeLog
index 75a461cfaca6..16f2dfe8c2f7 100644
--- a/fs/befs/ChangeLog
+++ b/fs/befs/ChangeLog
@@ -365,7 +365,7 @@ Version 0.4 (2001-10-28)
365 (fs/befs/super.c) 365 (fs/befs/super.c)
366 366
367* Tell the kernel to only mount befs read-only. 367* Tell the kernel to only mount befs read-only.
368 By setting the MS_RDONLY flag in befs_read_super(). 368 By setting the SB_RDONLY flag in befs_read_super().
369 Not that it was possible to write before. But now the kernel won't even try. 369 Not that it was possible to write before. But now the kernel won't even try.
370 (fs/befs/super.c) 370 (fs/befs/super.c)
371 371
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index a92355cc453b..ee236231cafa 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -841,7 +841,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
841 if (!sb_rdonly(sb)) { 841 if (!sb_rdonly(sb)) {
842 befs_warning(sb, 842 befs_warning(sb,
843 "No write support. Marking filesystem read-only"); 843 "No write support. Marking filesystem read-only");
844 sb->s_flags |= MS_RDONLY; 844 sb->s_flags |= SB_RDONLY;
845 } 845 }
846 846
847 /* 847 /*
@@ -948,7 +948,7 @@ static int
948befs_remount(struct super_block *sb, int *flags, char *data) 948befs_remount(struct super_block *sb, int *flags, char *data)
949{ 949{
950 sync_filesystem(sb); 950 sync_filesystem(sb);
951 if (!(*flags & MS_RDONLY)) 951 if (!(*flags & SB_RDONLY))
952 return -EINVAL; 952 return -EINVAL;
953 return 0; 953 return 0;
954} 954}
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index f7df5536ab61..51477a537c83 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2957,7 +2957,7 @@ static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info)
2957 */ 2957 */
2958static inline int btrfs_need_cleaner_sleep(struct btrfs_fs_info *fs_info) 2958static inline int btrfs_need_cleaner_sleep(struct btrfs_fs_info *fs_info)
2959{ 2959{
2960 return fs_info->sb->s_flags & MS_RDONLY || btrfs_fs_closing(fs_info); 2960 return fs_info->sb->s_flags & SB_RDONLY || btrfs_fs_closing(fs_info);
2961} 2961}
2962 2962
2963static inline void free_fs_info(struct btrfs_fs_info *fs_info) 2963static inline void free_fs_info(struct btrfs_fs_info *fs_info)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 16045ea86fc1..f9e9f721efe2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1984,7 +1984,7 @@ int repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
1984 struct btrfs_bio *bbio = NULL; 1984 struct btrfs_bio *bbio = NULL;
1985 int ret; 1985 int ret;
1986 1986
1987 ASSERT(!(fs_info->sb->s_flags & MS_RDONLY)); 1987 ASSERT(!(fs_info->sb->s_flags & SB_RDONLY));
1988 BUG_ON(!mirror_num); 1988 BUG_ON(!mirror_num);
1989 1989
1990 bio = btrfs_io_bio_alloc(1); 1990 bio = btrfs_io_bio_alloc(1);
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index fd172a93d11a..d748ad1c3620 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1172,7 +1172,7 @@ again:
1172 if (!i_done || ret) 1172 if (!i_done || ret)
1173 goto out; 1173 goto out;
1174 1174
1175 if (!(inode->i_sb->s_flags & MS_ACTIVE)) 1175 if (!(inode->i_sb->s_flags & SB_ACTIVE))
1176 goto out; 1176 goto out;
1177 1177
1178 /* 1178 /*
@@ -1333,7 +1333,7 @@ int btrfs_defrag_file(struct inode *inode, struct file *file,
1333 * make sure we stop running if someone unmounts 1333 * make sure we stop running if someone unmounts
1334 * the FS 1334 * the FS
1335 */ 1335 */
1336 if (!(inode->i_sb->s_flags & MS_ACTIVE)) 1336 if (!(inode->i_sb->s_flags & SB_ACTIVE))
1337 break; 1337 break;
1338 1338
1339 if (btrfs_defrag_cancelled(fs_info)) { 1339 if (btrfs_defrag_cancelled(fs_info)) {
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 65af029559b5..305cae7444a0 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -107,7 +107,7 @@ static void btrfs_handle_error(struct btrfs_fs_info *fs_info)
107 return; 107 return;
108 108
109 if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) { 109 if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) {
110 sb->s_flags |= MS_RDONLY; 110 sb->s_flags |= SB_RDONLY;
111 btrfs_info(fs_info, "forced readonly"); 111 btrfs_info(fs_info, "forced readonly");
112 /* 112 /*
113 * Note that a running device replace operation is not 113 * Note that a running device replace operation is not
@@ -137,7 +137,7 @@ void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function
137 137
138 /* 138 /*
139 * Special case: if the error is EROFS, and we're already 139 * Special case: if the error is EROFS, and we're already
140 * under MS_RDONLY, then it is safe here. 140 * under SB_RDONLY, then it is safe here.
141 */ 141 */
142 if (errno == -EROFS && sb_rdonly(sb)) 142 if (errno == -EROFS && sb_rdonly(sb))
143 return; 143 return;
@@ -168,7 +168,7 @@ void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function
168 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state); 168 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state);
169 169
170 /* Don't go through full error handling during mount */ 170 /* Don't go through full error handling during mount */
171 if (sb->s_flags & MS_BORN) 171 if (sb->s_flags & SB_BORN)
172 btrfs_handle_error(fs_info); 172 btrfs_handle_error(fs_info);
173} 173}
174 174
@@ -625,7 +625,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
625 break; 625 break;
626 case Opt_acl: 626 case Opt_acl:
627#ifdef CONFIG_BTRFS_FS_POSIX_ACL 627#ifdef CONFIG_BTRFS_FS_POSIX_ACL
628 info->sb->s_flags |= MS_POSIXACL; 628 info->sb->s_flags |= SB_POSIXACL;
629 break; 629 break;
630#else 630#else
631 btrfs_err(info, "support for ACL not compiled in!"); 631 btrfs_err(info, "support for ACL not compiled in!");
@@ -633,7 +633,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
633 goto out; 633 goto out;
634#endif 634#endif
635 case Opt_noacl: 635 case Opt_noacl:
636 info->sb->s_flags &= ~MS_POSIXACL; 636 info->sb->s_flags &= ~SB_POSIXACL;
637 break; 637 break;
638 case Opt_notreelog: 638 case Opt_notreelog:
639 btrfs_set_and_info(info, NOTREELOG, 639 btrfs_set_and_info(info, NOTREELOG,
@@ -851,7 +851,7 @@ check:
851 /* 851 /*
852 * Extra check for current option against current flag 852 * Extra check for current option against current flag
853 */ 853 */
854 if (btrfs_test_opt(info, NOLOGREPLAY) && !(new_flags & MS_RDONLY)) { 854 if (btrfs_test_opt(info, NOLOGREPLAY) && !(new_flags & SB_RDONLY)) {
855 btrfs_err(info, 855 btrfs_err(info,
856 "nologreplay must be used with ro mount option"); 856 "nologreplay must be used with ro mount option");
857 ret = -EINVAL; 857 ret = -EINVAL;
@@ -1147,7 +1147,7 @@ static int btrfs_fill_super(struct super_block *sb,
1147 sb->s_xattr = btrfs_xattr_handlers; 1147 sb->s_xattr = btrfs_xattr_handlers;
1148 sb->s_time_gran = 1; 1148 sb->s_time_gran = 1;
1149#ifdef CONFIG_BTRFS_FS_POSIX_ACL 1149#ifdef CONFIG_BTRFS_FS_POSIX_ACL
1150 sb->s_flags |= MS_POSIXACL; 1150 sb->s_flags |= SB_POSIXACL;
1151#endif 1151#endif
1152 sb->s_flags |= SB_I_VERSION; 1152 sb->s_flags |= SB_I_VERSION;
1153 sb->s_iflags |= SB_I_CGROUPWB; 1153 sb->s_iflags |= SB_I_CGROUPWB;
@@ -1180,7 +1180,7 @@ static int btrfs_fill_super(struct super_block *sb,
1180 } 1180 }
1181 1181
1182 cleancache_init_fs(sb); 1182 cleancache_init_fs(sb);
1183 sb->s_flags |= MS_ACTIVE; 1183 sb->s_flags |= SB_ACTIVE;
1184 return 0; 1184 return 0;
1185 1185
1186fail_close: 1186fail_close:
@@ -1277,7 +1277,7 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
1277 seq_puts(seq, ",flushoncommit"); 1277 seq_puts(seq, ",flushoncommit");
1278 if (btrfs_test_opt(info, DISCARD)) 1278 if (btrfs_test_opt(info, DISCARD))
1279 seq_puts(seq, ",discard"); 1279 seq_puts(seq, ",discard");
1280 if (!(info->sb->s_flags & MS_POSIXACL)) 1280 if (!(info->sb->s_flags & SB_POSIXACL))
1281 seq_puts(seq, ",noacl"); 1281 seq_puts(seq, ",noacl");
1282 if (btrfs_test_opt(info, SPACE_CACHE)) 1282 if (btrfs_test_opt(info, SPACE_CACHE))
1283 seq_puts(seq, ",space_cache"); 1283 seq_puts(seq, ",space_cache");
@@ -1409,11 +1409,11 @@ static struct dentry *mount_subvol(const char *subvol_name, u64 subvol_objectid,
1409 1409
1410 mnt = vfs_kern_mount(&btrfs_fs_type, flags, device_name, newargs); 1410 mnt = vfs_kern_mount(&btrfs_fs_type, flags, device_name, newargs);
1411 if (PTR_ERR_OR_ZERO(mnt) == -EBUSY) { 1411 if (PTR_ERR_OR_ZERO(mnt) == -EBUSY) {
1412 if (flags & MS_RDONLY) { 1412 if (flags & SB_RDONLY) {
1413 mnt = vfs_kern_mount(&btrfs_fs_type, flags & ~MS_RDONLY, 1413 mnt = vfs_kern_mount(&btrfs_fs_type, flags & ~SB_RDONLY,
1414 device_name, newargs); 1414 device_name, newargs);
1415 } else { 1415 } else {
1416 mnt = vfs_kern_mount(&btrfs_fs_type, flags | MS_RDONLY, 1416 mnt = vfs_kern_mount(&btrfs_fs_type, flags | SB_RDONLY,
1417 device_name, newargs); 1417 device_name, newargs);
1418 if (IS_ERR(mnt)) { 1418 if (IS_ERR(mnt)) {
1419 root = ERR_CAST(mnt); 1419 root = ERR_CAST(mnt);
@@ -1565,7 +1565,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
1565 u64 subvol_objectid = 0; 1565 u64 subvol_objectid = 0;
1566 int error = 0; 1566 int error = 0;
1567 1567
1568 if (!(flags & MS_RDONLY)) 1568 if (!(flags & SB_RDONLY))
1569 mode |= FMODE_WRITE; 1569 mode |= FMODE_WRITE;
1570 1570
1571 error = btrfs_parse_early_options(data, mode, fs_type, 1571 error = btrfs_parse_early_options(data, mode, fs_type,
@@ -1619,13 +1619,13 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
1619 if (error) 1619 if (error)
1620 goto error_fs_info; 1620 goto error_fs_info;
1621 1621
1622 if (!(flags & MS_RDONLY) && fs_devices->rw_devices == 0) { 1622 if (!(flags & SB_RDONLY) && fs_devices->rw_devices == 0) {
1623 error = -EACCES; 1623 error = -EACCES;
1624 goto error_close_devices; 1624 goto error_close_devices;
1625 } 1625 }
1626 1626
1627 bdev = fs_devices->latest_bdev; 1627 bdev = fs_devices->latest_bdev;
1628 s = sget(fs_type, btrfs_test_super, btrfs_set_super, flags | MS_NOSEC, 1628 s = sget(fs_type, btrfs_test_super, btrfs_set_super, flags | SB_NOSEC,
1629 fs_info); 1629 fs_info);
1630 if (IS_ERR(s)) { 1630 if (IS_ERR(s)) {
1631 error = PTR_ERR(s); 1631 error = PTR_ERR(s);
@@ -1635,7 +1635,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
1635 if (s->s_root) { 1635 if (s->s_root) {
1636 btrfs_close_devices(fs_devices); 1636 btrfs_close_devices(fs_devices);
1637 free_fs_info(fs_info); 1637 free_fs_info(fs_info);
1638 if ((flags ^ s->s_flags) & MS_RDONLY) 1638 if ((flags ^ s->s_flags) & SB_RDONLY)
1639 error = -EBUSY; 1639 error = -EBUSY;
1640 } else { 1640 } else {
1641 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev); 1641 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
@@ -1702,11 +1702,11 @@ static inline void btrfs_remount_begin(struct btrfs_fs_info *fs_info,
1702{ 1702{
1703 if (btrfs_raw_test_opt(old_opts, AUTO_DEFRAG) && 1703 if (btrfs_raw_test_opt(old_opts, AUTO_DEFRAG) &&
1704 (!btrfs_raw_test_opt(fs_info->mount_opt, AUTO_DEFRAG) || 1704 (!btrfs_raw_test_opt(fs_info->mount_opt, AUTO_DEFRAG) ||
1705 (flags & MS_RDONLY))) { 1705 (flags & SB_RDONLY))) {
1706 /* wait for any defraggers to finish */ 1706 /* wait for any defraggers to finish */
1707 wait_event(fs_info->transaction_wait, 1707 wait_event(fs_info->transaction_wait,
1708 (atomic_read(&fs_info->defrag_running) == 0)); 1708 (atomic_read(&fs_info->defrag_running) == 0));
1709 if (flags & MS_RDONLY) 1709 if (flags & SB_RDONLY)
1710 sync_filesystem(fs_info->sb); 1710 sync_filesystem(fs_info->sb);
1711 } 1711 }
1712} 1712}
@@ -1766,10 +1766,10 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
1766 btrfs_resize_thread_pool(fs_info, 1766 btrfs_resize_thread_pool(fs_info,
1767 fs_info->thread_pool_size, old_thread_pool_size); 1767 fs_info->thread_pool_size, old_thread_pool_size);
1768 1768
1769 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 1769 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
1770 goto out; 1770 goto out;
1771 1771
1772 if (*flags & MS_RDONLY) { 1772 if (*flags & SB_RDONLY) {
1773 /* 1773 /*
1774 * this also happens on 'umount -rf' or on shutdown, when 1774 * this also happens on 'umount -rf' or on shutdown, when
1775 * the filesystem is busy. 1775 * the filesystem is busy.
@@ -1781,10 +1781,10 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
1781 /* avoid complains from lockdep et al. */ 1781 /* avoid complains from lockdep et al. */
1782 up(&fs_info->uuid_tree_rescan_sem); 1782 up(&fs_info->uuid_tree_rescan_sem);
1783 1783
1784 sb->s_flags |= MS_RDONLY; 1784 sb->s_flags |= SB_RDONLY;
1785 1785
1786 /* 1786 /*
1787 * Setting MS_RDONLY will put the cleaner thread to 1787 * Setting SB_RDONLY will put the cleaner thread to
1788 * sleep at the next loop if it's already active. 1788 * sleep at the next loop if it's already active.
1789 * If it's already asleep, we'll leave unused block 1789 * If it's already asleep, we'll leave unused block
1790 * groups on disk until we're mounted read-write again 1790 * groups on disk until we're mounted read-write again
@@ -1856,7 +1856,7 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
1856 goto restore; 1856 goto restore;
1857 } 1857 }
1858 } 1858 }
1859 sb->s_flags &= ~MS_RDONLY; 1859 sb->s_flags &= ~SB_RDONLY;
1860 1860
1861 set_bit(BTRFS_FS_OPEN, &fs_info->flags); 1861 set_bit(BTRFS_FS_OPEN, &fs_info->flags);
1862 } 1862 }
@@ -1866,9 +1866,9 @@ out:
1866 return 0; 1866 return 0;
1867 1867
1868restore: 1868restore:
1869 /* We've hit an error - don't reset MS_RDONLY */ 1869 /* We've hit an error - don't reset SB_RDONLY */
1870 if (sb_rdonly(sb)) 1870 if (sb_rdonly(sb))
1871 old_flags |= MS_RDONLY; 1871 old_flags |= SB_RDONLY;
1872 sb->s_flags = old_flags; 1872 sb->s_flags = old_flags;
1873 fs_info->mount_opt = old_opts; 1873 fs_info->mount_opt = old_opts;
1874 fs_info->compress_type = old_compress_type; 1874 fs_info->compress_type = old_compress_type;
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f1ecb938ba4d..925070b9ce03 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2384,7 +2384,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path
2384 set_blocksize(device->bdev, BTRFS_BDEV_BLOCKSIZE); 2384 set_blocksize(device->bdev, BTRFS_BDEV_BLOCKSIZE);
2385 2385
2386 if (seeding_dev) { 2386 if (seeding_dev) {
2387 sb->s_flags &= ~MS_RDONLY; 2387 sb->s_flags &= ~SB_RDONLY;
2388 ret = btrfs_prepare_sprout(fs_info); 2388 ret = btrfs_prepare_sprout(fs_info);
2389 if (ret) { 2389 if (ret) {
2390 btrfs_abort_transaction(trans, ret); 2390 btrfs_abort_transaction(trans, ret);
@@ -2497,7 +2497,7 @@ error_sysfs:
2497 btrfs_sysfs_rm_device_link(fs_info->fs_devices, device); 2497 btrfs_sysfs_rm_device_link(fs_info->fs_devices, device);
2498error_trans: 2498error_trans:
2499 if (seeding_dev) 2499 if (seeding_dev)
2500 sb->s_flags |= MS_RDONLY; 2500 sb->s_flags |= SB_RDONLY;
2501 if (trans) 2501 if (trans)
2502 btrfs_end_transaction(trans); 2502 btrfs_end_transaction(trans);
2503 rcu_string_free(device->name); 2503 rcu_string_free(device->name);
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index fe9fbb3f13f7..a62d2a9841dc 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -331,11 +331,11 @@ static int parse_fsopt_token(char *c, void *private)
331 break; 331 break;
332#ifdef CONFIG_CEPH_FS_POSIX_ACL 332#ifdef CONFIG_CEPH_FS_POSIX_ACL
333 case Opt_acl: 333 case Opt_acl:
334 fsopt->sb_flags |= MS_POSIXACL; 334 fsopt->sb_flags |= SB_POSIXACL;
335 break; 335 break;
336#endif 336#endif
337 case Opt_noacl: 337 case Opt_noacl:
338 fsopt->sb_flags &= ~MS_POSIXACL; 338 fsopt->sb_flags &= ~SB_POSIXACL;
339 break; 339 break;
340 default: 340 default:
341 BUG_ON(token); 341 BUG_ON(token);
@@ -520,7 +520,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
520 seq_puts(m, ",nopoolperm"); 520 seq_puts(m, ",nopoolperm");
521 521
522#ifdef CONFIG_CEPH_FS_POSIX_ACL 522#ifdef CONFIG_CEPH_FS_POSIX_ACL
523 if (fsopt->sb_flags & MS_POSIXACL) 523 if (fsopt->sb_flags & SB_POSIXACL)
524 seq_puts(m, ",acl"); 524 seq_puts(m, ",acl");
525 else 525 else
526 seq_puts(m, ",noacl"); 526 seq_puts(m, ",noacl");
@@ -988,7 +988,7 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type,
988 dout("ceph_mount\n"); 988 dout("ceph_mount\n");
989 989
990#ifdef CONFIG_CEPH_FS_POSIX_ACL 990#ifdef CONFIG_CEPH_FS_POSIX_ACL
991 flags |= MS_POSIXACL; 991 flags |= SB_POSIXACL;
992#endif 992#endif
993 err = parse_mount_options(&fsopt, &opt, flags, data, dev_name); 993 err = parse_mount_options(&fsopt, &opt, flags, data, dev_name);
994 if (err < 0) { 994 if (err < 0) {
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
index cbd216b57239..350fa55a1bf7 100644
--- a/fs/cifs/cifs_fs_sb.h
+++ b/fs/cifs/cifs_fs_sb.h
@@ -42,7 +42,7 @@
42#define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */ 42#define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */
43#define CIFS_MOUNT_STRICT_IO 0x40000 /* strict cache mode */ 43#define CIFS_MOUNT_STRICT_IO 0x40000 /* strict cache mode */
44#define CIFS_MOUNT_RWPIDFORWARD 0x80000 /* use pid forwarding for rw */ 44#define CIFS_MOUNT_RWPIDFORWARD 0x80000 /* use pid forwarding for rw */
45#define CIFS_MOUNT_POSIXACL 0x100000 /* mirror of MS_POSIXACL in mnt_cifs_flags */ 45#define CIFS_MOUNT_POSIXACL 0x100000 /* mirror of SB_POSIXACL in mnt_cifs_flags */
46#define CIFS_MOUNT_CIFS_BACKUPUID 0x200000 /* backup intent bit for a user */ 46#define CIFS_MOUNT_CIFS_BACKUPUID 0x200000 /* backup intent bit for a user */
47#define CIFS_MOUNT_CIFS_BACKUPGID 0x400000 /* backup intent bit for a group */ 47#define CIFS_MOUNT_CIFS_BACKUPGID 0x400000 /* backup intent bit for a group */
48#define CIFS_MOUNT_MAP_SFM_CHR 0x800000 /* SFM/MAC mapping for illegal chars */ 48#define CIFS_MOUNT_MAP_SFM_CHR 0x800000 /* SFM/MAC mapping for illegal chars */
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 8c8b75d33f31..31b7565b1617 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -125,7 +125,7 @@ cifs_read_super(struct super_block *sb)
125 tcon = cifs_sb_master_tcon(cifs_sb); 125 tcon = cifs_sb_master_tcon(cifs_sb);
126 126
127 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIXACL) 127 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIXACL)
128 sb->s_flags |= MS_POSIXACL; 128 sb->s_flags |= SB_POSIXACL;
129 129
130 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) 130 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files)
131 sb->s_maxbytes = MAX_LFS_FILESIZE; 131 sb->s_maxbytes = MAX_LFS_FILESIZE;
@@ -497,7 +497,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
497 seq_puts(s, ",cifsacl"); 497 seq_puts(s, ",cifsacl");
498 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) 498 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)
499 seq_puts(s, ",dynperm"); 499 seq_puts(s, ",dynperm");
500 if (root->d_sb->s_flags & MS_POSIXACL) 500 if (root->d_sb->s_flags & SB_POSIXACL)
501 seq_puts(s, ",acl"); 501 seq_puts(s, ",acl");
502 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) 502 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS)
503 seq_puts(s, ",mfsymlinks"); 503 seq_puts(s, ",mfsymlinks");
@@ -573,7 +573,7 @@ static int cifs_show_stats(struct seq_file *s, struct dentry *root)
573static int cifs_remount(struct super_block *sb, int *flags, char *data) 573static int cifs_remount(struct super_block *sb, int *flags, char *data)
574{ 574{
575 sync_filesystem(sb); 575 sync_filesystem(sb);
576 *flags |= MS_NODIRATIME; 576 *flags |= SB_NODIRATIME;
577 return 0; 577 return 0;
578} 578}
579 579
@@ -708,7 +708,7 @@ cifs_do_mount(struct file_system_type *fs_type,
708 708
709 rc = cifs_mount(cifs_sb, volume_info); 709 rc = cifs_mount(cifs_sb, volume_info);
710 if (rc) { 710 if (rc) {
711 if (!(flags & MS_SILENT)) 711 if (!(flags & SB_SILENT))
712 cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n", 712 cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n",
713 rc); 713 rc);
714 root = ERR_PTR(rc); 714 root = ERR_PTR(rc);
@@ -720,7 +720,7 @@ cifs_do_mount(struct file_system_type *fs_type,
720 mnt_data.flags = flags; 720 mnt_data.flags = flags;
721 721
722 /* BB should we make this contingent on mount parm? */ 722 /* BB should we make this contingent on mount parm? */
723 flags |= MS_NODIRATIME | MS_NOATIME; 723 flags |= SB_NODIRATIME | SB_NOATIME;
724 724
725 sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data); 725 sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data);
726 if (IS_ERR(sb)) { 726 if (IS_ERR(sb)) {
@@ -739,7 +739,7 @@ cifs_do_mount(struct file_system_type *fs_type,
739 goto out_super; 739 goto out_super;
740 } 740 }
741 741
742 sb->s_flags |= MS_ACTIVE; 742 sb->s_flags |= SB_ACTIVE;
743 } 743 }
744 744
745 root = cifs_get_root(volume_info, sb); 745 root = cifs_get_root(volume_info, sb);
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index e185b2853eab..b16583594d1a 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -559,8 +559,8 @@ struct smb_vol {
559 CIFS_MOUNT_MULTIUSER | CIFS_MOUNT_STRICT_IO | \ 559 CIFS_MOUNT_MULTIUSER | CIFS_MOUNT_STRICT_IO | \
560 CIFS_MOUNT_CIFS_BACKUPUID | CIFS_MOUNT_CIFS_BACKUPGID) 560 CIFS_MOUNT_CIFS_BACKUPUID | CIFS_MOUNT_CIFS_BACKUPGID)
561 561
562#define CIFS_MS_MASK (MS_RDONLY | MS_MANDLOCK | MS_NOEXEC | MS_NOSUID | \ 562#define CIFS_MS_MASK (SB_RDONLY | SB_MANDLOCK | SB_NOEXEC | SB_NOSUID | \
563 MS_NODEV | MS_SYNCHRONOUS) 563 SB_NODEV | SB_SYNCHRONOUS)
564 564
565struct cifs_mnt_data { 565struct cifs_mnt_data {
566 struct cifs_sb_info *cifs_sb; 566 struct cifs_sb_info *cifs_sb;
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 7c732cb44164..ecb99079363a 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -985,7 +985,7 @@ retry_iget5_locked:
985 } 985 }
986 986
987 cifs_fattr_to_inode(inode, fattr); 987 cifs_fattr_to_inode(inode, fattr);
988 if (sb->s_flags & MS_NOATIME) 988 if (sb->s_flags & SB_NOATIME)
989 inode->i_flags |= S_NOATIME | S_NOCMTIME; 989 inode->i_flags |= S_NOATIME | S_NOCMTIME;
990 if (inode->i_state & I_NEW) { 990 if (inode->i_state & I_NEW) {
991 inode->i_ino = hash; 991 inode->i_ino = hash;
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 52f975d848a0..316af84674f1 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -117,7 +117,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
117#ifdef CONFIG_CIFS_POSIX 117#ifdef CONFIG_CIFS_POSIX
118 if (!value) 118 if (!value)
119 goto out; 119 goto out;
120 if (sb->s_flags & MS_POSIXACL) 120 if (sb->s_flags & SB_POSIXACL)
121 rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, 121 rc = CIFSSMBSetPosixACL(xid, pTcon, full_path,
122 value, (const int)size, 122 value, (const int)size,
123 ACL_TYPE_ACCESS, cifs_sb->local_nls, 123 ACL_TYPE_ACCESS, cifs_sb->local_nls,
@@ -129,7 +129,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
129#ifdef CONFIG_CIFS_POSIX 129#ifdef CONFIG_CIFS_POSIX
130 if (!value) 130 if (!value)
131 goto out; 131 goto out;
132 if (sb->s_flags & MS_POSIXACL) 132 if (sb->s_flags & SB_POSIXACL)
133 rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, 133 rc = CIFSSMBSetPosixACL(xid, pTcon, full_path,
134 value, (const int)size, 134 value, (const int)size,
135 ACL_TYPE_DEFAULT, cifs_sb->local_nls, 135 ACL_TYPE_DEFAULT, cifs_sb->local_nls,
@@ -266,7 +266,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
266 266
267 case XATTR_ACL_ACCESS: 267 case XATTR_ACL_ACCESS:
268#ifdef CONFIG_CIFS_POSIX 268#ifdef CONFIG_CIFS_POSIX
269 if (sb->s_flags & MS_POSIXACL) 269 if (sb->s_flags & SB_POSIXACL)
270 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, 270 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
271 value, size, ACL_TYPE_ACCESS, 271 value, size, ACL_TYPE_ACCESS,
272 cifs_sb->local_nls, 272 cifs_sb->local_nls,
@@ -276,7 +276,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
276 276
277 case XATTR_ACL_DEFAULT: 277 case XATTR_ACL_DEFAULT:
278#ifdef CONFIG_CIFS_POSIX 278#ifdef CONFIG_CIFS_POSIX
279 if (sb->s_flags & MS_POSIXACL) 279 if (sb->s_flags & SB_POSIXACL)
280 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, 280 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
281 value, size, ACL_TYPE_DEFAULT, 281 value, size, ACL_TYPE_DEFAULT,
282 cifs_sb->local_nls, 282 cifs_sb->local_nls,
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 6f0a6a4d5faa..97424cf206c0 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -96,7 +96,7 @@ void coda_destroy_inodecache(void)
96static int coda_remount(struct super_block *sb, int *flags, char *data) 96static int coda_remount(struct super_block *sb, int *flags, char *data)
97{ 97{
98 sync_filesystem(sb); 98 sync_filesystem(sb);
99 *flags |= MS_NOATIME; 99 *flags |= SB_NOATIME;
100 return 0; 100 return 0;
101} 101}
102 102
@@ -188,7 +188,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
188 mutex_unlock(&vc->vc_mutex); 188 mutex_unlock(&vc->vc_mutex);
189 189
190 sb->s_fs_info = vc; 190 sb->s_fs_info = vc;
191 sb->s_flags |= MS_NOATIME; 191 sb->s_flags |= SB_NOATIME;
192 sb->s_blocksize = 4096; /* XXXXX what do we put here?? */ 192 sb->s_blocksize = 4096; /* XXXXX what do we put here?? */
193 sb->s_blocksize_bits = 12; 193 sb->s_blocksize_bits = 12;
194 sb->s_magic = CODA_SUPER_MAGIC; 194 sb->s_magic = CODA_SUPER_MAGIC;
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 9a2ab419ba62..017b0ab19bc4 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -505,7 +505,7 @@ static void cramfs_kill_sb(struct super_block *sb)
505static int cramfs_remount(struct super_block *sb, int *flags, char *data) 505static int cramfs_remount(struct super_block *sb, int *flags, char *data)
506{ 506{
507 sync_filesystem(sb); 507 sync_filesystem(sb);
508 *flags |= MS_RDONLY; 508 *flags |= SB_RDONLY;
509 return 0; 509 return 0;
510} 510}
511 511
@@ -592,7 +592,7 @@ static int cramfs_finalize_super(struct super_block *sb,
592 struct inode *root; 592 struct inode *root;
593 593
594 /* Set it all up.. */ 594 /* Set it all up.. */
595 sb->s_flags |= MS_RDONLY; 595 sb->s_flags |= SB_RDONLY;
596 sb->s_op = &cramfs_ops; 596 sb->s_op = &cramfs_ops;
597 root = get_cramfs_inode(sb, cramfs_root, 0); 597 root = get_cramfs_inode(sb, cramfs_root, 0);
598 if (IS_ERR(root)) 598 if (IS_ERR(root))
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index f2677c90d96e..025d66a705db 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -560,8 +560,8 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
560 * Set the POSIX ACL flag based on whether they're enabled in the lower 560 * Set the POSIX ACL flag based on whether they're enabled in the lower
561 * mount. 561 * mount.
562 */ 562 */
563 s->s_flags = flags & ~MS_POSIXACL; 563 s->s_flags = flags & ~SB_POSIXACL;
564 s->s_flags |= path.dentry->d_sb->s_flags & MS_POSIXACL; 564 s->s_flags |= path.dentry->d_sb->s_flags & SB_POSIXACL;
565 565
566 /** 566 /**
567 * Force a read-only eCryptfs mount when: 567 * Force a read-only eCryptfs mount when:
@@ -569,7 +569,7 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
569 * 2) The ecryptfs_encrypted_view mount option is specified 569 * 2) The ecryptfs_encrypted_view mount option is specified
570 */ 570 */
571 if (sb_rdonly(path.dentry->d_sb) || mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED) 571 if (sb_rdonly(path.dentry->d_sb) || mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED)
572 s->s_flags |= MS_RDONLY; 572 s->s_flags |= SB_RDONLY;
573 573
574 s->s_maxbytes = path.dentry->d_sb->s_maxbytes; 574 s->s_maxbytes = path.dentry->d_sb->s_maxbytes;
575 s->s_blocksize = path.dentry->d_sb->s_blocksize; 575 s->s_blocksize = path.dentry->d_sb->s_blocksize;
@@ -602,7 +602,7 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
602 ecryptfs_set_dentry_private(s->s_root, root_info); 602 ecryptfs_set_dentry_private(s->s_root, root_info);
603 root_info->lower_path = path; 603 root_info->lower_path = path;
604 604
605 s->s_flags |= MS_ACTIVE; 605 s->s_flags |= SB_ACTIVE;
606 return dget(s->s_root); 606 return dget(s->s_root);
607 607
608out_free: 608out_free:
diff --git a/fs/efs/super.c b/fs/efs/super.c
index 65b59009555b..6ffb7ba1547a 100644
--- a/fs/efs/super.c
+++ b/fs/efs/super.c
@@ -116,7 +116,7 @@ static void destroy_inodecache(void)
116static int efs_remount(struct super_block *sb, int *flags, char *data) 116static int efs_remount(struct super_block *sb, int *flags, char *data)
117{ 117{
118 sync_filesystem(sb); 118 sync_filesystem(sb);
119 *flags |= MS_RDONLY; 119 *flags |= SB_RDONLY;
120 return 0; 120 return 0;
121} 121}
122 122
@@ -311,7 +311,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
311#ifdef DEBUG 311#ifdef DEBUG
312 pr_info("forcing read-only mode\n"); 312 pr_info("forcing read-only mode\n");
313#endif 313#endif
314 s->s_flags |= MS_RDONLY; 314 s->s_flags |= SB_RDONLY;
315 } 315 }
316 s->s_op = &efs_superblock_operations; 316 s->s_op = &efs_superblock_operations;
317 s->s_export_op = &efs_export_ops; 317 s->s_export_op = &efs_export_ops;
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index e1b3724bebf2..33db13365c5e 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -548,7 +548,7 @@ do_more:
548 } 548 }
549 549
550 mark_buffer_dirty(bitmap_bh); 550 mark_buffer_dirty(bitmap_bh);
551 if (sb->s_flags & MS_SYNCHRONOUS) 551 if (sb->s_flags & SB_SYNCHRONOUS)
552 sync_dirty_buffer(bitmap_bh); 552 sync_dirty_buffer(bitmap_bh);
553 553
554 group_adjust_blocks(sb, block_group, desc, bh2, group_freed); 554 group_adjust_blocks(sb, block_group, desc, bh2, group_freed);
@@ -1424,7 +1424,7 @@ allocated:
1424 percpu_counter_sub(&sbi->s_freeblocks_counter, num); 1424 percpu_counter_sub(&sbi->s_freeblocks_counter, num);
1425 1425
1426 mark_buffer_dirty(bitmap_bh); 1426 mark_buffer_dirty(bitmap_bh);
1427 if (sb->s_flags & MS_SYNCHRONOUS) 1427 if (sb->s_flags & SB_SYNCHRONOUS)
1428 sync_dirty_buffer(bitmap_bh); 1428 sync_dirty_buffer(bitmap_bh);
1429 1429
1430 *errp = 0; 1430 *errp = 0;
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index a1fc3dabca41..6484199b35d1 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -145,7 +145,7 @@ void ext2_free_inode (struct inode * inode)
145 else 145 else
146 ext2_release_inode(sb, block_group, is_directory); 146 ext2_release_inode(sb, block_group, is_directory);
147 mark_buffer_dirty(bitmap_bh); 147 mark_buffer_dirty(bitmap_bh);
148 if (sb->s_flags & MS_SYNCHRONOUS) 148 if (sb->s_flags & SB_SYNCHRONOUS)
149 sync_dirty_buffer(bitmap_bh); 149 sync_dirty_buffer(bitmap_bh);
150 150
151 brelse(bitmap_bh); 151 brelse(bitmap_bh);
@@ -517,7 +517,7 @@ repeat_in_this_group:
517 goto fail; 517 goto fail;
518got: 518got:
519 mark_buffer_dirty(bitmap_bh); 519 mark_buffer_dirty(bitmap_bh);
520 if (sb->s_flags & MS_SYNCHRONOUS) 520 if (sb->s_flags & SB_SYNCHRONOUS)
521 sync_dirty_buffer(bitmap_bh); 521 sync_dirty_buffer(bitmap_bh);
522 brelse(bitmap_bh); 522 brelse(bitmap_bh);
523 523
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index e2b6be03e69b..7646818ab266 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -75,7 +75,7 @@ void ext2_error(struct super_block *sb, const char *function,
75 if (test_opt(sb, ERRORS_RO)) { 75 if (test_opt(sb, ERRORS_RO)) {
76 ext2_msg(sb, KERN_CRIT, 76 ext2_msg(sb, KERN_CRIT,
77 "error: remounting filesystem read-only"); 77 "error: remounting filesystem read-only");
78 sb->s_flags |= MS_RDONLY; 78 sb->s_flags |= SB_RDONLY;
79 } 79 }
80} 80}
81 81
@@ -656,7 +656,7 @@ static int ext2_setup_super (struct super_block * sb,
656 ext2_msg(sb, KERN_ERR, 656 ext2_msg(sb, KERN_ERR,
657 "error: revision level too high, " 657 "error: revision level too high, "
658 "forcing read-only mode"); 658 "forcing read-only mode");
659 res = MS_RDONLY; 659 res = SB_RDONLY;
660 } 660 }
661 if (read_only) 661 if (read_only)
662 return res; 662 return res;
@@ -924,9 +924,9 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
924 sbi->s_resuid = opts.s_resuid; 924 sbi->s_resuid = opts.s_resuid;
925 sbi->s_resgid = opts.s_resgid; 925 sbi->s_resgid = opts.s_resgid;
926 926
927 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 927 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
928 ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? 928 ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ?
929 MS_POSIXACL : 0); 929 SB_POSIXACL : 0);
930 sb->s_iflags |= SB_I_CGROUPWB; 930 sb->s_iflags |= SB_I_CGROUPWB;
931 931
932 if (le32_to_cpu(es->s_rev_level) == EXT2_GOOD_OLD_REV && 932 if (le32_to_cpu(es->s_rev_level) == EXT2_GOOD_OLD_REV &&
@@ -1178,7 +1178,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
1178 ext2_msg(sb, KERN_WARNING, 1178 ext2_msg(sb, KERN_WARNING,
1179 "warning: mounting ext3 filesystem as ext2"); 1179 "warning: mounting ext3 filesystem as ext2");
1180 if (ext2_setup_super (sb, es, sb_rdonly(sb))) 1180 if (ext2_setup_super (sb, es, sb_rdonly(sb)))
1181 sb->s_flags |= MS_RDONLY; 1181 sb->s_flags |= SB_RDONLY;
1182 ext2_write_super(sb); 1182 ext2_write_super(sb);
1183 return 0; 1183 return 0;
1184 1184
@@ -1341,9 +1341,9 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
1341 "dax flag with busy inodes while remounting"); 1341 "dax flag with busy inodes while remounting");
1342 new_opts.s_mount_opt ^= EXT2_MOUNT_DAX; 1342 new_opts.s_mount_opt ^= EXT2_MOUNT_DAX;
1343 } 1343 }
1344 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 1344 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
1345 goto out_set; 1345 goto out_set;
1346 if (*flags & MS_RDONLY) { 1346 if (*flags & SB_RDONLY) {
1347 if (le16_to_cpu(es->s_state) & EXT2_VALID_FS || 1347 if (le16_to_cpu(es->s_state) & EXT2_VALID_FS ||
1348 !(sbi->s_mount_state & EXT2_VALID_FS)) 1348 !(sbi->s_mount_state & EXT2_VALID_FS))
1349 goto out_set; 1349 goto out_set;
@@ -1379,7 +1379,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
1379 */ 1379 */
1380 sbi->s_mount_state = le16_to_cpu(es->s_state); 1380 sbi->s_mount_state = le16_to_cpu(es->s_state);
1381 if (!ext2_setup_super (sb, es, 0)) 1381 if (!ext2_setup_super (sb, es, 0))
1382 sb->s_flags &= ~MS_RDONLY; 1382 sb->s_flags &= ~SB_RDONLY;
1383 spin_unlock(&sbi->s_lock); 1383 spin_unlock(&sbi->s_lock);
1384 1384
1385 ext2_write_super(sb); 1385 ext2_write_super(sb);
@@ -1392,8 +1392,8 @@ out_set:
1392 sbi->s_mount_opt = new_opts.s_mount_opt; 1392 sbi->s_mount_opt = new_opts.s_mount_opt;
1393 sbi->s_resuid = new_opts.s_resuid; 1393 sbi->s_resuid = new_opts.s_resuid;
1394 sbi->s_resgid = new_opts.s_resgid; 1394 sbi->s_resgid = new_opts.s_resgid;
1395 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 1395 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
1396 ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); 1396 ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? SB_POSIXACL : 0);
1397 spin_unlock(&sbi->s_lock); 1397 spin_unlock(&sbi->s_lock);
1398 1398
1399 return 0; 1399 return 0;
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0992d76f7ab1..7df2c5644e59 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2742,7 +2742,7 @@ static int ext4_writepages(struct address_space *mapping,
2742 * If the filesystem has aborted, it is read-only, so return 2742 * If the filesystem has aborted, it is read-only, so return
2743 * right away instead of dumping stack traces later on that 2743 * right away instead of dumping stack traces later on that
2744 * will obscure the real source of the problem. We test 2744 * will obscure the real source of the problem. We test
2745 * EXT4_MF_FS_ABORTED instead of sb->s_flag's MS_RDONLY because 2745 * EXT4_MF_FS_ABORTED instead of sb->s_flag's SB_RDONLY because
2746 * the latter could be true if the filesystem is mounted 2746 * the latter could be true if the filesystem is mounted
2747 * read-only, and in that case, ext4_writepages should 2747 * read-only, and in that case, ext4_writepages should
2748 * *never* be called, so if that ever happens, we would want 2748 * *never* be called, so if that ever happens, we would want
@@ -5183,7 +5183,7 @@ static int ext4_do_update_inode(handle_t *handle,
5183 5183
5184 ext4_inode_csum_set(inode, raw_inode, ei); 5184 ext4_inode_csum_set(inode, raw_inode, ei);
5185 spin_unlock(&ei->i_raw_lock); 5185 spin_unlock(&ei->i_raw_lock);
5186 if (inode->i_sb->s_flags & MS_LAZYTIME) 5186 if (inode->i_sb->s_flags & SB_LAZYTIME)
5187 ext4_update_other_inodes_time(inode->i_sb, inode->i_ino, 5187 ext4_update_other_inodes_time(inode->i_sb, inode->i_ino,
5188 bh->b_data); 5188 bh->b_data);
5189 5189
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 0556cd036b69..7c46693a14d7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -422,7 +422,7 @@ static void ext4_handle_error(struct super_block *sb)
422 * before ->s_flags update 422 * before ->s_flags update
423 */ 423 */
424 smp_wmb(); 424 smp_wmb();
425 sb->s_flags |= MS_RDONLY; 425 sb->s_flags |= SB_RDONLY;
426 } 426 }
427 if (test_opt(sb, ERRORS_PANIC)) { 427 if (test_opt(sb, ERRORS_PANIC)) {
428 if (EXT4_SB(sb)->s_journal && 428 if (EXT4_SB(sb)->s_journal &&
@@ -635,7 +635,7 @@ void __ext4_abort(struct super_block *sb, const char *function,
635 * before ->s_flags update 635 * before ->s_flags update
636 */ 636 */
637 smp_wmb(); 637 smp_wmb();
638 sb->s_flags |= MS_RDONLY; 638 sb->s_flags |= SB_RDONLY;
639 if (EXT4_SB(sb)->s_journal) 639 if (EXT4_SB(sb)->s_journal)
640 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); 640 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO);
641 save_error_info(sb, function, line); 641 save_error_info(sb, function, line);
@@ -1682,10 +1682,10 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
1682 sb->s_flags |= SB_I_VERSION; 1682 sb->s_flags |= SB_I_VERSION;
1683 return 1; 1683 return 1;
1684 case Opt_lazytime: 1684 case Opt_lazytime:
1685 sb->s_flags |= MS_LAZYTIME; 1685 sb->s_flags |= SB_LAZYTIME;
1686 return 1; 1686 return 1;
1687 case Opt_nolazytime: 1687 case Opt_nolazytime:
1688 sb->s_flags &= ~MS_LAZYTIME; 1688 sb->s_flags &= ~SB_LAZYTIME;
1689 return 1; 1689 return 1;
1690 } 1690 }
1691 1691
@@ -2116,7 +2116,7 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
2116 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { 2116 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) {
2117 ext4_msg(sb, KERN_ERR, "revision level too high, " 2117 ext4_msg(sb, KERN_ERR, "revision level too high, "
2118 "forcing read-only mode"); 2118 "forcing read-only mode");
2119 res = MS_RDONLY; 2119 res = SB_RDONLY;
2120 } 2120 }
2121 if (read_only) 2121 if (read_only)
2122 goto done; 2122 goto done;
@@ -2429,7 +2429,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2429 2429
2430 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { 2430 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) {
2431 /* don't clear list on RO mount w/ errors */ 2431 /* don't clear list on RO mount w/ errors */
2432 if (es->s_last_orphan && !(s_flags & MS_RDONLY)) { 2432 if (es->s_last_orphan && !(s_flags & SB_RDONLY)) {
2433 ext4_msg(sb, KERN_INFO, "Errors on filesystem, " 2433 ext4_msg(sb, KERN_INFO, "Errors on filesystem, "
2434 "clearing orphan list.\n"); 2434 "clearing orphan list.\n");
2435 es->s_last_orphan = 0; 2435 es->s_last_orphan = 0;
@@ -2438,19 +2438,19 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2438 return; 2438 return;
2439 } 2439 }
2440 2440
2441 if (s_flags & MS_RDONLY) { 2441 if (s_flags & SB_RDONLY) {
2442 ext4_msg(sb, KERN_INFO, "orphan cleanup on readonly fs"); 2442 ext4_msg(sb, KERN_INFO, "orphan cleanup on readonly fs");
2443 sb->s_flags &= ~MS_RDONLY; 2443 sb->s_flags &= ~SB_RDONLY;
2444 } 2444 }
2445#ifdef CONFIG_QUOTA 2445#ifdef CONFIG_QUOTA
2446 /* Needed for iput() to work correctly and not trash data */ 2446 /* Needed for iput() to work correctly and not trash data */
2447 sb->s_flags |= MS_ACTIVE; 2447 sb->s_flags |= SB_ACTIVE;
2448 2448
2449 /* 2449 /*
2450 * Turn on quotas which were not enabled for read-only mounts if 2450 * Turn on quotas which were not enabled for read-only mounts if
2451 * filesystem has quota feature, so that they are updated correctly. 2451 * filesystem has quota feature, so that they are updated correctly.
2452 */ 2452 */
2453 if (ext4_has_feature_quota(sb) && (s_flags & MS_RDONLY)) { 2453 if (ext4_has_feature_quota(sb) && (s_flags & SB_RDONLY)) {
2454 int ret = ext4_enable_quotas(sb); 2454 int ret = ext4_enable_quotas(sb);
2455 2455
2456 if (!ret) 2456 if (!ret)
@@ -2539,7 +2539,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2539 } 2539 }
2540 } 2540 }
2541#endif 2541#endif
2542 sb->s_flags = s_flags; /* Restore MS_RDONLY status */ 2542 sb->s_flags = s_flags; /* Restore SB_RDONLY status */
2543} 2543}
2544 2544
2545/* 2545/*
@@ -2741,7 +2741,7 @@ static int ext4_feature_set_ok(struct super_block *sb, int readonly)
2741 2741
2742 if (ext4_has_feature_readonly(sb)) { 2742 if (ext4_has_feature_readonly(sb)) {
2743 ext4_msg(sb, KERN_INFO, "filesystem is read-only"); 2743 ext4_msg(sb, KERN_INFO, "filesystem is read-only");
2744 sb->s_flags |= MS_RDONLY; 2744 sb->s_flags |= SB_RDONLY;
2745 return 1; 2745 return 1;
2746 } 2746 }
2747 2747
@@ -3623,8 +3623,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
3623 sb->s_iflags |= SB_I_CGROUPWB; 3623 sb->s_iflags |= SB_I_CGROUPWB;
3624 } 3624 }
3625 3625
3626 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 3626 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
3627 (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0); 3627 (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
3628 3628
3629 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV && 3629 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV &&
3630 (ext4_has_compat_features(sb) || 3630 (ext4_has_compat_features(sb) ||
@@ -4199,7 +4199,7 @@ no_journal:
4199 } 4199 }
4200 4200
4201 if (ext4_setup_super(sb, es, sb_rdonly(sb))) 4201 if (ext4_setup_super(sb, es, sb_rdonly(sb)))
4202 sb->s_flags |= MS_RDONLY; 4202 sb->s_flags |= SB_RDONLY;
4203 4203
4204 /* determine the minimum size of new large inodes, if present */ 4204 /* determine the minimum size of new large inodes, if present */
4205 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE && 4205 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE &&
@@ -4693,7 +4693,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
4693 * the clock is set in the future, and this will cause e2fsck 4693 * the clock is set in the future, and this will cause e2fsck
4694 * to complain and force a full file system check. 4694 * to complain and force a full file system check.
4695 */ 4695 */
4696 if (!(sb->s_flags & MS_RDONLY)) 4696 if (!(sb->s_flags & SB_RDONLY))
4697 es->s_wtime = cpu_to_le32(get_seconds()); 4697 es->s_wtime = cpu_to_le32(get_seconds());
4698 if (sb->s_bdev->bd_part) 4698 if (sb->s_bdev->bd_part)
4699 es->s_kbytes_written = 4699 es->s_kbytes_written =
@@ -5047,8 +5047,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5047 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) 5047 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
5048 ext4_abort(sb, "Abort forced by user"); 5048 ext4_abort(sb, "Abort forced by user");
5049 5049
5050 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 5050 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
5051 (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0); 5051 (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
5052 5052
5053 es = sbi->s_es; 5053 es = sbi->s_es;
5054 5054
@@ -5057,16 +5057,16 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5057 set_task_ioprio(sbi->s_journal->j_task, journal_ioprio); 5057 set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
5058 } 5058 }
5059 5059
5060 if (*flags & MS_LAZYTIME) 5060 if (*flags & SB_LAZYTIME)
5061 sb->s_flags |= MS_LAZYTIME; 5061 sb->s_flags |= SB_LAZYTIME;
5062 5062
5063 if ((bool)(*flags & MS_RDONLY) != sb_rdonly(sb)) { 5063 if ((bool)(*flags & SB_RDONLY) != sb_rdonly(sb)) {
5064 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { 5064 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
5065 err = -EROFS; 5065 err = -EROFS;
5066 goto restore_opts; 5066 goto restore_opts;
5067 } 5067 }
5068 5068
5069 if (*flags & MS_RDONLY) { 5069 if (*flags & SB_RDONLY) {
5070 err = sync_filesystem(sb); 5070 err = sync_filesystem(sb);
5071 if (err < 0) 5071 if (err < 0)
5072 goto restore_opts; 5072 goto restore_opts;
@@ -5078,7 +5078,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5078 * First of all, the unconditional stuff we have to do 5078 * First of all, the unconditional stuff we have to do
5079 * to disable replay of the journal when we next remount 5079 * to disable replay of the journal when we next remount
5080 */ 5080 */
5081 sb->s_flags |= MS_RDONLY; 5081 sb->s_flags |= SB_RDONLY;
5082 5082
5083 /* 5083 /*
5084 * OK, test if we are remounting a valid rw partition 5084 * OK, test if we are remounting a valid rw partition
@@ -5140,7 +5140,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5140 ext4_clear_journal_err(sb, es); 5140 ext4_clear_journal_err(sb, es);
5141 sbi->s_mount_state = le16_to_cpu(es->s_state); 5141 sbi->s_mount_state = le16_to_cpu(es->s_state);
5142 if (!ext4_setup_super(sb, es, 0)) 5142 if (!ext4_setup_super(sb, es, 0))
5143 sb->s_flags &= ~MS_RDONLY; 5143 sb->s_flags &= ~SB_RDONLY;
5144 if (ext4_has_feature_mmp(sb)) 5144 if (ext4_has_feature_mmp(sb))
5145 if (ext4_multi_mount_protect(sb, 5145 if (ext4_multi_mount_protect(sb,
5146 le64_to_cpu(es->s_mmp_block))) { 5146 le64_to_cpu(es->s_mmp_block))) {
@@ -5164,7 +5164,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5164 } 5164 }
5165 5165
5166 ext4_setup_system_zone(sb); 5166 ext4_setup_system_zone(sb);
5167 if (sbi->s_journal == NULL && !(old_sb_flags & MS_RDONLY)) 5167 if (sbi->s_journal == NULL && !(old_sb_flags & SB_RDONLY))
5168 ext4_commit_super(sb, 1); 5168 ext4_commit_super(sb, 1);
5169 5169
5170#ifdef CONFIG_QUOTA 5170#ifdef CONFIG_QUOTA
@@ -5182,7 +5182,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5182 } 5182 }
5183#endif 5183#endif
5184 5184
5185 *flags = (*flags & ~MS_LAZYTIME) | (sb->s_flags & MS_LAZYTIME); 5185 *flags = (*flags & ~SB_LAZYTIME) | (sb->s_flags & SB_LAZYTIME);
5186 ext4_msg(sb, KERN_INFO, "re-mounted. Opts: %s", orig_data); 5186 ext4_msg(sb, KERN_INFO, "re-mounted. Opts: %s", orig_data);
5187 kfree(orig_data); 5187 kfree(orig_data);
5188 return 0; 5188 return 0;
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index dd2e73e10857..4aa69bc1c70a 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -617,17 +617,17 @@ int recover_orphan_inodes(struct f2fs_sb_info *sbi)
617 if (!is_set_ckpt_flags(sbi, CP_ORPHAN_PRESENT_FLAG)) 617 if (!is_set_ckpt_flags(sbi, CP_ORPHAN_PRESENT_FLAG))
618 return 0; 618 return 0;
619 619
620 if (s_flags & MS_RDONLY) { 620 if (s_flags & SB_RDONLY) {
621 f2fs_msg(sbi->sb, KERN_INFO, "orphan cleanup on readonly fs"); 621 f2fs_msg(sbi->sb, KERN_INFO, "orphan cleanup on readonly fs");
622 sbi->sb->s_flags &= ~MS_RDONLY; 622 sbi->sb->s_flags &= ~SB_RDONLY;
623 } 623 }
624 624
625#ifdef CONFIG_QUOTA 625#ifdef CONFIG_QUOTA
626 /* Needed for iput() to work correctly and not trash data */ 626 /* Needed for iput() to work correctly and not trash data */
627 sbi->sb->s_flags |= MS_ACTIVE; 627 sbi->sb->s_flags |= SB_ACTIVE;
628 628
629 /* Turn on quotas so that they are updated correctly */ 629 /* Turn on quotas so that they are updated correctly */
630 quota_enabled = f2fs_enable_quota_files(sbi, s_flags & MS_RDONLY); 630 quota_enabled = f2fs_enable_quota_files(sbi, s_flags & SB_RDONLY);
631#endif 631#endif
632 632
633 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi); 633 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi);
@@ -658,7 +658,7 @@ out:
658 if (quota_enabled) 658 if (quota_enabled)
659 f2fs_quota_off_umount(sbi->sb); 659 f2fs_quota_off_umount(sbi->sb);
660#endif 660#endif
661 sbi->sb->s_flags = s_flags; /* Restore MS_RDONLY status */ 661 sbi->sb->s_flags = s_flags; /* Restore SB_RDONLY status */
662 662
663 return err; 663 return err;
664} 664}
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index f4e094e816c6..6abf26c31d01 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2378,7 +2378,7 @@ static inline bool f2fs_skip_inode_update(struct inode *inode, int dsync)
2378 2378
2379static inline int f2fs_readonly(struct super_block *sb) 2379static inline int f2fs_readonly(struct super_block *sb)
2380{ 2380{
2381 return sb->s_flags & MS_RDONLY; 2381 return sb->s_flags & SB_RDONLY;
2382} 2382}
2383 2383
2384static inline bool f2fs_cp_error(struct f2fs_sb_info *sbi) 2384static inline bool f2fs_cp_error(struct f2fs_sb_info *sbi)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 5d5bba462f26..d844dcb80570 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1005,7 +1005,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync,
1005 1005
1006 cpc.reason = __get_cp_reason(sbi); 1006 cpc.reason = __get_cp_reason(sbi);
1007gc_more: 1007gc_more:
1008 if (unlikely(!(sbi->sb->s_flags & MS_ACTIVE))) { 1008 if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) {
1009 ret = -EINVAL; 1009 ret = -EINVAL;
1010 goto stop; 1010 goto stop;
1011 } 1011 }
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 92c57ace1939..b3a14b0429f2 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -598,16 +598,16 @@ int recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only)
598 int quota_enabled; 598 int quota_enabled;
599#endif 599#endif
600 600
601 if (s_flags & MS_RDONLY) { 601 if (s_flags & SB_RDONLY) {
602 f2fs_msg(sbi->sb, KERN_INFO, "orphan cleanup on readonly fs"); 602 f2fs_msg(sbi->sb, KERN_INFO, "orphan cleanup on readonly fs");
603 sbi->sb->s_flags &= ~MS_RDONLY; 603 sbi->sb->s_flags &= ~SB_RDONLY;
604 } 604 }
605 605
606#ifdef CONFIG_QUOTA 606#ifdef CONFIG_QUOTA
607 /* Needed for iput() to work correctly and not trash data */ 607 /* Needed for iput() to work correctly and not trash data */
608 sbi->sb->s_flags |= MS_ACTIVE; 608 sbi->sb->s_flags |= SB_ACTIVE;
609 /* Turn on quotas so that they are updated correctly */ 609 /* Turn on quotas so that they are updated correctly */
610 quota_enabled = f2fs_enable_quota_files(sbi, s_flags & MS_RDONLY); 610 quota_enabled = f2fs_enable_quota_files(sbi, s_flags & SB_RDONLY);
611#endif 611#endif
612 612
613 fsync_entry_slab = f2fs_kmem_cache_create("f2fs_fsync_inode_entry", 613 fsync_entry_slab = f2fs_kmem_cache_create("f2fs_fsync_inode_entry",
@@ -671,7 +671,7 @@ out:
671 if (quota_enabled) 671 if (quota_enabled)
672 f2fs_quota_off_umount(sbi->sb); 672 f2fs_quota_off_umount(sbi->sb);
673#endif 673#endif
674 sbi->sb->s_flags = s_flags; /* Restore MS_RDONLY status */ 674 sbi->sb->s_flags = s_flags; /* Restore SB_RDONLY status */
675 675
676 return ret ? ret: err; 676 return ret ? ret: err;
677} 677}
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index a6c5dd450002..708155d9c2e4 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -534,10 +534,10 @@ static int parse_options(struct super_block *sb, char *options)
534#endif 534#endif
535 break; 535 break;
536 case Opt_lazytime: 536 case Opt_lazytime:
537 sb->s_flags |= MS_LAZYTIME; 537 sb->s_flags |= SB_LAZYTIME;
538 break; 538 break;
539 case Opt_nolazytime: 539 case Opt_nolazytime:
540 sb->s_flags &= ~MS_LAZYTIME; 540 sb->s_flags &= ~SB_LAZYTIME;
541 break; 541 break;
542#ifdef CONFIG_QUOTA 542#ifdef CONFIG_QUOTA
543 case Opt_quota: 543 case Opt_quota:
@@ -1168,7 +1168,7 @@ static void default_options(struct f2fs_sb_info *sbi)
1168 set_opt(sbi, INLINE_DENTRY); 1168 set_opt(sbi, INLINE_DENTRY);
1169 set_opt(sbi, EXTENT_CACHE); 1169 set_opt(sbi, EXTENT_CACHE);
1170 set_opt(sbi, NOHEAP); 1170 set_opt(sbi, NOHEAP);
1171 sbi->sb->s_flags |= MS_LAZYTIME; 1171 sbi->sb->s_flags |= SB_LAZYTIME;
1172 set_opt(sbi, FLUSH_MERGE); 1172 set_opt(sbi, FLUSH_MERGE);
1173 if (f2fs_sb_mounted_blkzoned(sbi->sb)) { 1173 if (f2fs_sb_mounted_blkzoned(sbi->sb)) {
1174 set_opt_mode(sbi, F2FS_MOUNT_LFS); 1174 set_opt_mode(sbi, F2FS_MOUNT_LFS);
@@ -1236,7 +1236,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
1236#endif 1236#endif
1237 1237
1238 /* recover superblocks we couldn't write due to previous RO mount */ 1238 /* recover superblocks we couldn't write due to previous RO mount */
1239 if (!(*flags & MS_RDONLY) && is_sbi_flag_set(sbi, SBI_NEED_SB_WRITE)) { 1239 if (!(*flags & SB_RDONLY) && is_sbi_flag_set(sbi, SBI_NEED_SB_WRITE)) {
1240 err = f2fs_commit_super(sbi, false); 1240 err = f2fs_commit_super(sbi, false);
1241 f2fs_msg(sb, KERN_INFO, 1241 f2fs_msg(sb, KERN_INFO,
1242 "Try to recover all the superblocks, ret: %d", err); 1242 "Try to recover all the superblocks, ret: %d", err);
@@ -1255,17 +1255,17 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
1255 * Previous and new state of filesystem is RO, 1255 * Previous and new state of filesystem is RO,
1256 * so skip checking GC and FLUSH_MERGE conditions. 1256 * so skip checking GC and FLUSH_MERGE conditions.
1257 */ 1257 */
1258 if (f2fs_readonly(sb) && (*flags & MS_RDONLY)) 1258 if (f2fs_readonly(sb) && (*flags & SB_RDONLY))
1259 goto skip; 1259 goto skip;
1260 1260
1261#ifdef CONFIG_QUOTA 1261#ifdef CONFIG_QUOTA
1262 if (!f2fs_readonly(sb) && (*flags & MS_RDONLY)) { 1262 if (!f2fs_readonly(sb) && (*flags & SB_RDONLY)) {
1263 err = dquot_suspend(sb, -1); 1263 err = dquot_suspend(sb, -1);
1264 if (err < 0) 1264 if (err < 0)
1265 goto restore_opts; 1265 goto restore_opts;
1266 } else { 1266 } else {
1267 /* dquot_resume needs RW */ 1267 /* dquot_resume needs RW */
1268 sb->s_flags &= ~MS_RDONLY; 1268 sb->s_flags &= ~SB_RDONLY;
1269 if (sb_any_quota_suspended(sb)) { 1269 if (sb_any_quota_suspended(sb)) {
1270 dquot_resume(sb, -1); 1270 dquot_resume(sb, -1);
1271 } else if (f2fs_sb_has_quota_ino(sb)) { 1271 } else if (f2fs_sb_has_quota_ino(sb)) {
@@ -1288,7 +1288,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
1288 * or if background_gc = off is passed in mount 1288 * or if background_gc = off is passed in mount
1289 * option. Also sync the filesystem. 1289 * option. Also sync the filesystem.
1290 */ 1290 */
1291 if ((*flags & MS_RDONLY) || !test_opt(sbi, BG_GC)) { 1291 if ((*flags & SB_RDONLY) || !test_opt(sbi, BG_GC)) {
1292 if (sbi->gc_thread) { 1292 if (sbi->gc_thread) {
1293 stop_gc_thread(sbi); 1293 stop_gc_thread(sbi);
1294 need_restart_gc = true; 1294 need_restart_gc = true;
@@ -1300,7 +1300,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
1300 need_stop_gc = true; 1300 need_stop_gc = true;
1301 } 1301 }
1302 1302
1303 if (*flags & MS_RDONLY) { 1303 if (*flags & SB_RDONLY) {
1304 writeback_inodes_sb(sb, WB_REASON_SYNC); 1304 writeback_inodes_sb(sb, WB_REASON_SYNC);
1305 sync_inodes_sb(sb); 1305 sync_inodes_sb(sb);
1306 1306
@@ -1314,7 +1314,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
1314 * We stop issue flush thread if FS is mounted as RO 1314 * We stop issue flush thread if FS is mounted as RO
1315 * or if flush_merge is not passed in mount option. 1315 * or if flush_merge is not passed in mount option.
1316 */ 1316 */
1317 if ((*flags & MS_RDONLY) || !test_opt(sbi, FLUSH_MERGE)) { 1317 if ((*flags & SB_RDONLY) || !test_opt(sbi, FLUSH_MERGE)) {
1318 clear_opt(sbi, FLUSH_MERGE); 1318 clear_opt(sbi, FLUSH_MERGE);
1319 destroy_flush_cmd_control(sbi, false); 1319 destroy_flush_cmd_control(sbi, false);
1320 } else { 1320 } else {
@@ -1329,8 +1329,8 @@ skip:
1329 kfree(s_qf_names[i]); 1329 kfree(s_qf_names[i]);
1330#endif 1330#endif
1331 /* Update the POSIXACL Flag */ 1331 /* Update the POSIXACL Flag */
1332 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 1332 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
1333 (test_opt(sbi, POSIX_ACL) ? MS_POSIXACL : 0); 1333 (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
1334 1334
1335 return 0; 1335 return 0;
1336restore_gc: 1336restore_gc:
@@ -2472,8 +2472,8 @@ try_onemore:
2472 sb->s_export_op = &f2fs_export_ops; 2472 sb->s_export_op = &f2fs_export_ops;
2473 sb->s_magic = F2FS_SUPER_MAGIC; 2473 sb->s_magic = F2FS_SUPER_MAGIC;
2474 sb->s_time_gran = 1; 2474 sb->s_time_gran = 1;
2475 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 2475 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
2476 (test_opt(sbi, POSIX_ACL) ? MS_POSIXACL : 0); 2476 (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
2477 memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid)); 2477 memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid));
2478 2478
2479 /* init f2fs-specific super block info */ 2479 /* init f2fs-specific super block info */
diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c
index 48b2336692f9..bac10de678cc 100644
--- a/fs/fat/fatent.c
+++ b/fs/fat/fatent.c
@@ -392,7 +392,7 @@ static int fat_mirror_bhs(struct super_block *sb, struct buffer_head **bhs,
392 memcpy(c_bh->b_data, bhs[n]->b_data, sb->s_blocksize); 392 memcpy(c_bh->b_data, bhs[n]->b_data, sb->s_blocksize);
393 set_buffer_uptodate(c_bh); 393 set_buffer_uptodate(c_bh);
394 mark_buffer_dirty_inode(c_bh, sbi->fat_inode); 394 mark_buffer_dirty_inode(c_bh, sbi->fat_inode);
395 if (sb->s_flags & MS_SYNCHRONOUS) 395 if (sb->s_flags & SB_SYNCHRONOUS)
396 err = sync_dirty_buffer(c_bh); 396 err = sync_dirty_buffer(c_bh);
397 brelse(c_bh); 397 brelse(c_bh);
398 if (err) 398 if (err)
@@ -597,7 +597,7 @@ int fat_free_clusters(struct inode *inode, int cluster)
597 } 597 }
598 598
599 if (nr_bhs + fatent.nr_bhs > MAX_BUF_PER_PAGE) { 599 if (nr_bhs + fatent.nr_bhs > MAX_BUF_PER_PAGE) {
600 if (sb->s_flags & MS_SYNCHRONOUS) { 600 if (sb->s_flags & SB_SYNCHRONOUS) {
601 err = fat_sync_bhs(bhs, nr_bhs); 601 err = fat_sync_bhs(bhs, nr_bhs);
602 if (err) 602 if (err)
603 goto error; 603 goto error;
@@ -612,7 +612,7 @@ int fat_free_clusters(struct inode *inode, int cluster)
612 fat_collect_bhs(bhs, &nr_bhs, &fatent); 612 fat_collect_bhs(bhs, &nr_bhs, &fatent);
613 } while (cluster != FAT_ENT_EOF); 613 } while (cluster != FAT_ENT_EOF);
614 614
615 if (sb->s_flags & MS_SYNCHRONOUS) { 615 if (sb->s_flags & SB_SYNCHRONOUS) {
616 err = fat_sync_bhs(bhs, nr_bhs); 616 err = fat_sync_bhs(bhs, nr_bhs);
617 if (err) 617 if (err)
618 goto error; 618 goto error;
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 30c52394a7ad..016c46b5e44c 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -781,12 +781,12 @@ static int fat_remount(struct super_block *sb, int *flags, char *data)
781{ 781{
782 int new_rdonly; 782 int new_rdonly;
783 struct msdos_sb_info *sbi = MSDOS_SB(sb); 783 struct msdos_sb_info *sbi = MSDOS_SB(sb);
784 *flags |= MS_NODIRATIME | (sbi->options.isvfat ? 0 : MS_NOATIME); 784 *flags |= SB_NODIRATIME | (sbi->options.isvfat ? 0 : SB_NOATIME);
785 785
786 sync_filesystem(sb); 786 sync_filesystem(sb);
787 787
788 /* make sure we update state on remount. */ 788 /* make sure we update state on remount. */
789 new_rdonly = *flags & MS_RDONLY; 789 new_rdonly = *flags & SB_RDONLY;
790 if (new_rdonly != sb_rdonly(sb)) { 790 if (new_rdonly != sb_rdonly(sb)) {
791 if (new_rdonly) 791 if (new_rdonly)
792 fat_set_state(sb, 0, 0); 792 fat_set_state(sb, 0, 0);
@@ -1352,7 +1352,7 @@ out:
1352 if (opts->unicode_xlate) 1352 if (opts->unicode_xlate)
1353 opts->utf8 = 0; 1353 opts->utf8 = 0;
1354 if (opts->nfs == FAT_NFS_NOSTALE_RO) { 1354 if (opts->nfs == FAT_NFS_NOSTALE_RO) {
1355 sb->s_flags |= MS_RDONLY; 1355 sb->s_flags |= SB_RDONLY;
1356 sb->s_export_op = &fat_export_ops_nostale; 1356 sb->s_export_op = &fat_export_ops_nostale;
1357 } 1357 }
1358 1358
@@ -1608,7 +1608,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
1608 return -ENOMEM; 1608 return -ENOMEM;
1609 sb->s_fs_info = sbi; 1609 sb->s_fs_info = sbi;
1610 1610
1611 sb->s_flags |= MS_NODIRATIME; 1611 sb->s_flags |= SB_NODIRATIME;
1612 sb->s_magic = MSDOS_SUPER_MAGIC; 1612 sb->s_magic = MSDOS_SUPER_MAGIC;
1613 sb->s_op = &fat_sops; 1613 sb->s_op = &fat_sops;
1614 sb->s_export_op = &fat_export_ops; 1614 sb->s_export_op = &fat_export_ops;
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index acc3aa30ee54..f9bdc1e01c98 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -33,7 +33,7 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
33 if (opts->errors == FAT_ERRORS_PANIC) 33 if (opts->errors == FAT_ERRORS_PANIC)
34 panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id); 34 panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id);
35 else if (opts->errors == FAT_ERRORS_RO && !sb_rdonly(sb)) { 35 else if (opts->errors == FAT_ERRORS_RO && !sb_rdonly(sb)) {
36 sb->s_flags |= MS_RDONLY; 36 sb->s_flags |= SB_RDONLY;
37 fat_msg(sb, KERN_ERR, "Filesystem has been set read-only"); 37 fat_msg(sb, KERN_ERR, "Filesystem has been set read-only");
38 } 38 }
39} 39}
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c
index 7d6a105d601b..d24d2758a363 100644
--- a/fs/fat/namei_msdos.c
+++ b/fs/fat/namei_msdos.c
@@ -646,7 +646,7 @@ static void setup(struct super_block *sb)
646{ 646{
647 MSDOS_SB(sb)->dir_ops = &msdos_dir_inode_operations; 647 MSDOS_SB(sb)->dir_ops = &msdos_dir_inode_operations;
648 sb->s_d_op = &msdos_dentry_operations; 648 sb->s_d_op = &msdos_dentry_operations;
649 sb->s_flags |= MS_NOATIME; 649 sb->s_flags |= SB_NOATIME;
650} 650}
651 651
652static int msdos_fill_super(struct super_block *sb, void *data, int silent) 652static int msdos_fill_super(struct super_block *sb, void *data, int silent)
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c
index 455ce5b77e9b..f989efa051a0 100644
--- a/fs/freevxfs/vxfs_super.c
+++ b/fs/freevxfs/vxfs_super.c
@@ -116,7 +116,7 @@ vxfs_statfs(struct dentry *dentry, struct kstatfs *bufp)
116static int vxfs_remount(struct super_block *sb, int *flags, char *data) 116static int vxfs_remount(struct super_block *sb, int *flags, char *data)
117{ 117{
118 sync_filesystem(sb); 118 sync_filesystem(sb);
119 *flags |= MS_RDONLY; 119 *flags |= SB_RDONLY;
120 return 0; 120 return 0;
121} 121}
122 122
@@ -220,7 +220,7 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
220 int ret = -EINVAL; 220 int ret = -EINVAL;
221 u32 j; 221 u32 j;
222 222
223 sbp->s_flags |= MS_RDONLY; 223 sbp->s_flags |= SB_RDONLY;
224 224
225 infp = kzalloc(sizeof(*infp), GFP_KERNEL); 225 infp = kzalloc(sizeof(*infp), GFP_KERNEL);
226 if (!infp) { 226 if (!infp) {
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 08f5debd07d1..cea4836385b7 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -490,7 +490,7 @@ static void inode_switch_wbs(struct inode *inode, int new_wb_id)
490 490
491 /* while holding I_WB_SWITCH, no one else can update the association */ 491 /* while holding I_WB_SWITCH, no one else can update the association */
492 spin_lock(&inode->i_lock); 492 spin_lock(&inode->i_lock);
493 if (!(inode->i_sb->s_flags & MS_ACTIVE) || 493 if (!(inode->i_sb->s_flags & SB_ACTIVE) ||
494 inode->i_state & (I_WB_SWITCH | I_FREEING) || 494 inode->i_state & (I_WB_SWITCH | I_FREEING) ||
495 inode_to_wb(inode) == isw->new_wb) { 495 inode_to_wb(inode) == isw->new_wb) {
496 spin_unlock(&inode->i_lock); 496 spin_unlock(&inode->i_lock);
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 2f504d615d92..624f18bbfd2b 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -130,7 +130,7 @@ static void fuse_evict_inode(struct inode *inode)
130{ 130{
131 truncate_inode_pages_final(&inode->i_data); 131 truncate_inode_pages_final(&inode->i_data);
132 clear_inode(inode); 132 clear_inode(inode);
133 if (inode->i_sb->s_flags & MS_ACTIVE) { 133 if (inode->i_sb->s_flags & SB_ACTIVE) {
134 struct fuse_conn *fc = get_fuse_conn(inode); 134 struct fuse_conn *fc = get_fuse_conn(inode);
135 struct fuse_inode *fi = get_fuse_inode(inode); 135 struct fuse_inode *fi = get_fuse_inode(inode);
136 fuse_queue_forget(fc, fi->forget, fi->nodeid, fi->nlookup); 136 fuse_queue_forget(fc, fi->forget, fi->nodeid, fi->nlookup);
@@ -141,7 +141,7 @@ static void fuse_evict_inode(struct inode *inode)
141static int fuse_remount_fs(struct super_block *sb, int *flags, char *data) 141static int fuse_remount_fs(struct super_block *sb, int *flags, char *data)
142{ 142{
143 sync_filesystem(sb); 143 sync_filesystem(sb);
144 if (*flags & MS_MANDLOCK) 144 if (*flags & SB_MANDLOCK)
145 return -EINVAL; 145 return -EINVAL;
146 146
147 return 0; 147 return 0;
@@ -1056,10 +1056,10 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
1056 int is_bdev = sb->s_bdev != NULL; 1056 int is_bdev = sb->s_bdev != NULL;
1057 1057
1058 err = -EINVAL; 1058 err = -EINVAL;
1059 if (sb->s_flags & MS_MANDLOCK) 1059 if (sb->s_flags & SB_MANDLOCK)
1060 goto err; 1060 goto err;
1061 1061
1062 sb->s_flags &= ~(MS_NOSEC | SB_I_VERSION); 1062 sb->s_flags &= ~(SB_NOSEC | SB_I_VERSION);
1063 1063
1064 if (!parse_fuse_opt(data, &d, is_bdev)) 1064 if (!parse_fuse_opt(data, &d, is_bdev))
1065 goto err; 1065 goto err;
@@ -1109,9 +1109,9 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
1109 goto err_dev_free; 1109 goto err_dev_free;
1110 1110
1111 /* Handle umasking inside the fuse code */ 1111 /* Handle umasking inside the fuse code */
1112 if (sb->s_flags & MS_POSIXACL) 1112 if (sb->s_flags & SB_POSIXACL)
1113 fc->dont_mask = 1; 1113 fc->dont_mask = 1;
1114 sb->s_flags |= MS_POSIXACL; 1114 sb->s_flags |= SB_POSIXACL;
1115 1115
1116 fc->default_permissions = d.default_permissions; 1116 fc->default_permissions = d.default_permissions;
1117 fc->allow_other = d.allow_other; 1117 fc->allow_other = d.allow_other;
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index a3711f543405..ad55eb86a250 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1065,15 +1065,15 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent
1065 sdp->sd_args = *args; 1065 sdp->sd_args = *args;
1066 1066
1067 if (sdp->sd_args.ar_spectator) { 1067 if (sdp->sd_args.ar_spectator) {
1068 sb->s_flags |= MS_RDONLY; 1068 sb->s_flags |= SB_RDONLY;
1069 set_bit(SDF_RORECOVERY, &sdp->sd_flags); 1069 set_bit(SDF_RORECOVERY, &sdp->sd_flags);
1070 } 1070 }
1071 if (sdp->sd_args.ar_posix_acl) 1071 if (sdp->sd_args.ar_posix_acl)
1072 sb->s_flags |= MS_POSIXACL; 1072 sb->s_flags |= SB_POSIXACL;
1073 if (sdp->sd_args.ar_nobarrier) 1073 if (sdp->sd_args.ar_nobarrier)
1074 set_bit(SDF_NOBARRIERS, &sdp->sd_flags); 1074 set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
1075 1075
1076 sb->s_flags |= MS_NOSEC; 1076 sb->s_flags |= SB_NOSEC;
1077 sb->s_magic = GFS2_MAGIC; 1077 sb->s_magic = GFS2_MAGIC;
1078 sb->s_op = &gfs2_super_ops; 1078 sb->s_op = &gfs2_super_ops;
1079 sb->s_d_op = &gfs2_dops; 1079 sb->s_d_op = &gfs2_dops;
@@ -1257,7 +1257,7 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type, int flags,
1257 struct gfs2_args args; 1257 struct gfs2_args args;
1258 struct gfs2_sbd *sdp; 1258 struct gfs2_sbd *sdp;
1259 1259
1260 if (!(flags & MS_RDONLY)) 1260 if (!(flags & SB_RDONLY))
1261 mode |= FMODE_WRITE; 1261 mode |= FMODE_WRITE;
1262 1262
1263 bdev = blkdev_get_by_path(dev_name, mode, fs_type); 1263 bdev = blkdev_get_by_path(dev_name, mode, fs_type);
@@ -1313,15 +1313,15 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type, int flags,
1313 1313
1314 if (s->s_root) { 1314 if (s->s_root) {
1315 error = -EBUSY; 1315 error = -EBUSY;
1316 if ((flags ^ s->s_flags) & MS_RDONLY) 1316 if ((flags ^ s->s_flags) & SB_RDONLY)
1317 goto error_super; 1317 goto error_super;
1318 } else { 1318 } else {
1319 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev); 1319 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
1320 sb_set_blocksize(s, block_size(bdev)); 1320 sb_set_blocksize(s, block_size(bdev));
1321 error = fill_super(s, &args, flags & MS_SILENT ? 1 : 0); 1321 error = fill_super(s, &args, flags & SB_SILENT ? 1 : 0);
1322 if (error) 1322 if (error)
1323 goto error_super; 1323 goto error_super;
1324 s->s_flags |= MS_ACTIVE; 1324 s->s_flags |= SB_ACTIVE;
1325 bdev->bd_super = s; 1325 bdev->bd_super = s;
1326 } 1326 }
1327 1327
@@ -1365,7 +1365,7 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,
1365 pr_warn("gfs2 mount does not exist\n"); 1365 pr_warn("gfs2 mount does not exist\n");
1366 return ERR_CAST(s); 1366 return ERR_CAST(s);
1367 } 1367 }
1368 if ((flags ^ s->s_flags) & MS_RDONLY) { 1368 if ((flags ^ s->s_flags) & SB_RDONLY) {
1369 deactivate_locked_super(s); 1369 deactivate_locked_super(s);
1370 return ERR_PTR(-EBUSY); 1370 return ERR_PTR(-EBUSY);
1371 } 1371 }
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 9cb5c9a97d69..d81d46e19726 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1256,10 +1256,10 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
1256 return -EINVAL; 1256 return -EINVAL;
1257 1257
1258 if (sdp->sd_args.ar_spectator) 1258 if (sdp->sd_args.ar_spectator)
1259 *flags |= MS_RDONLY; 1259 *flags |= SB_RDONLY;
1260 1260
1261 if ((sb->s_flags ^ *flags) & MS_RDONLY) { 1261 if ((sb->s_flags ^ *flags) & SB_RDONLY) {
1262 if (*flags & MS_RDONLY) 1262 if (*flags & SB_RDONLY)
1263 error = gfs2_make_fs_ro(sdp); 1263 error = gfs2_make_fs_ro(sdp);
1264 else 1264 else
1265 error = gfs2_make_fs_rw(sdp); 1265 error = gfs2_make_fs_rw(sdp);
@@ -1269,9 +1269,9 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
1269 1269
1270 sdp->sd_args = args; 1270 sdp->sd_args = args;
1271 if (sdp->sd_args.ar_posix_acl) 1271 if (sdp->sd_args.ar_posix_acl)
1272 sb->s_flags |= MS_POSIXACL; 1272 sb->s_flags |= SB_POSIXACL;
1273 else 1273 else
1274 sb->s_flags &= ~MS_POSIXACL; 1274 sb->s_flags &= ~SB_POSIXACL;
1275 if (sdp->sd_args.ar_nobarrier) 1275 if (sdp->sd_args.ar_nobarrier)
1276 set_bit(SDF_NOBARRIERS, &sdp->sd_flags); 1276 set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
1277 else 1277 else
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index a85ca8b2c9ba..ca8b72d0a831 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -117,7 +117,7 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
117 kfree(tr); 117 kfree(tr);
118 up_read(&sdp->sd_log_flush_lock); 118 up_read(&sdp->sd_log_flush_lock);
119 119
120 if (sdp->sd_vfs->s_flags & MS_SYNCHRONOUS) 120 if (sdp->sd_vfs->s_flags & SB_SYNCHRONOUS)
121 gfs2_log_flush(sdp, NULL, NORMAL_FLUSH); 121 gfs2_log_flush(sdp, NULL, NORMAL_FLUSH);
122 if (alloced) 122 if (alloced)
123 sb_end_intwrite(sdp->sd_vfs); 123 sb_end_intwrite(sdp->sd_vfs);
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c
index 894994d2c885..460281b1299e 100644
--- a/fs/hfs/mdb.c
+++ b/fs/hfs/mdb.c
@@ -204,11 +204,11 @@ int hfs_mdb_get(struct super_block *sb)
204 attrib = mdb->drAtrb; 204 attrib = mdb->drAtrb;
205 if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { 205 if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) {
206 pr_warn("filesystem was not cleanly unmounted, running fsck.hfs is recommended. mounting read-only.\n"); 206 pr_warn("filesystem was not cleanly unmounted, running fsck.hfs is recommended. mounting read-only.\n");
207 sb->s_flags |= MS_RDONLY; 207 sb->s_flags |= SB_RDONLY;
208 } 208 }
209 if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) { 209 if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) {
210 pr_warn("filesystem is marked locked, mounting read-only.\n"); 210 pr_warn("filesystem is marked locked, mounting read-only.\n");
211 sb->s_flags |= MS_RDONLY; 211 sb->s_flags |= SB_RDONLY;
212 } 212 }
213 if (!sb_rdonly(sb)) { 213 if (!sb_rdonly(sb)) {
214 /* Mark the volume uncleanly unmounted in case we crash */ 214 /* Mark the volume uncleanly unmounted in case we crash */
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 7e0d65e9586c..173876782f73 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -114,18 +114,18 @@ static int hfs_statfs(struct dentry *dentry, struct kstatfs *buf)
114static int hfs_remount(struct super_block *sb, int *flags, char *data) 114static int hfs_remount(struct super_block *sb, int *flags, char *data)
115{ 115{
116 sync_filesystem(sb); 116 sync_filesystem(sb);
117 *flags |= MS_NODIRATIME; 117 *flags |= SB_NODIRATIME;
118 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 118 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
119 return 0; 119 return 0;
120 if (!(*flags & MS_RDONLY)) { 120 if (!(*flags & SB_RDONLY)) {
121 if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { 121 if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) {
122 pr_warn("filesystem was not cleanly unmounted, running fsck.hfs is recommended. leaving read-only.\n"); 122 pr_warn("filesystem was not cleanly unmounted, running fsck.hfs is recommended. leaving read-only.\n");
123 sb->s_flags |= MS_RDONLY; 123 sb->s_flags |= SB_RDONLY;
124 *flags |= MS_RDONLY; 124 *flags |= SB_RDONLY;
125 } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { 125 } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) {
126 pr_warn("filesystem is marked locked, leaving read-only.\n"); 126 pr_warn("filesystem is marked locked, leaving read-only.\n");
127 sb->s_flags |= MS_RDONLY; 127 sb->s_flags |= SB_RDONLY;
128 *flags |= MS_RDONLY; 128 *flags |= SB_RDONLY;
129 } 129 }
130 } 130 }
131 return 0; 131 return 0;
@@ -407,7 +407,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
407 407
408 sb->s_op = &hfs_super_operations; 408 sb->s_op = &hfs_super_operations;
409 sb->s_xattr = hfs_xattr_handlers; 409 sb->s_xattr = hfs_xattr_handlers;
410 sb->s_flags |= MS_NODIRATIME; 410 sb->s_flags |= SB_NODIRATIME;
411 mutex_init(&sbi->bitmap_lock); 411 mutex_init(&sbi->bitmap_lock);
412 412
413 res = hfs_mdb_get(sb); 413 res = hfs_mdb_get(sb);
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index e5bb2de2262a..1d458b716957 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -329,9 +329,9 @@ static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf)
329static int hfsplus_remount(struct super_block *sb, int *flags, char *data) 329static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
330{ 330{
331 sync_filesystem(sb); 331 sync_filesystem(sb);
332 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 332 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
333 return 0; 333 return 0;
334 if (!(*flags & MS_RDONLY)) { 334 if (!(*flags & SB_RDONLY)) {
335 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr; 335 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr;
336 int force = 0; 336 int force = 0;
337 337
@@ -340,20 +340,20 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
340 340
341 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { 341 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) {
342 pr_warn("filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. leaving read-only.\n"); 342 pr_warn("filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. leaving read-only.\n");
343 sb->s_flags |= MS_RDONLY; 343 sb->s_flags |= SB_RDONLY;
344 *flags |= MS_RDONLY; 344 *flags |= SB_RDONLY;
345 } else if (force) { 345 } else if (force) {
346 /* nothing */ 346 /* nothing */
347 } else if (vhdr->attributes & 347 } else if (vhdr->attributes &
348 cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 348 cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
349 pr_warn("filesystem is marked locked, leaving read-only.\n"); 349 pr_warn("filesystem is marked locked, leaving read-only.\n");
350 sb->s_flags |= MS_RDONLY; 350 sb->s_flags |= SB_RDONLY;
351 *flags |= MS_RDONLY; 351 *flags |= SB_RDONLY;
352 } else if (vhdr->attributes & 352 } else if (vhdr->attributes &
353 cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { 353 cpu_to_be32(HFSPLUS_VOL_JOURNALED)) {
354 pr_warn("filesystem is marked journaled, leaving read-only.\n"); 354 pr_warn("filesystem is marked journaled, leaving read-only.\n");
355 sb->s_flags |= MS_RDONLY; 355 sb->s_flags |= SB_RDONLY;
356 *flags |= MS_RDONLY; 356 *flags |= SB_RDONLY;
357 } 357 }
358 } 358 }
359 return 0; 359 return 0;
@@ -455,16 +455,16 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
455 455
456 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { 456 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) {
457 pr_warn("Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. mounting read-only.\n"); 457 pr_warn("Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. mounting read-only.\n");
458 sb->s_flags |= MS_RDONLY; 458 sb->s_flags |= SB_RDONLY;
459 } else if (test_and_clear_bit(HFSPLUS_SB_FORCE, &sbi->flags)) { 459 } else if (test_and_clear_bit(HFSPLUS_SB_FORCE, &sbi->flags)) {
460 /* nothing */ 460 /* nothing */
461 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 461 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
462 pr_warn("Filesystem is marked locked, mounting read-only.\n"); 462 pr_warn("Filesystem is marked locked, mounting read-only.\n");
463 sb->s_flags |= MS_RDONLY; 463 sb->s_flags |= SB_RDONLY;
464 } else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) && 464 } else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) &&
465 !sb_rdonly(sb)) { 465 !sb_rdonly(sb)) {
466 pr_warn("write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.\n"); 466 pr_warn("write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.\n");
467 sb->s_flags |= MS_RDONLY; 467 sb->s_flags |= SB_RDONLY;
468 } 468 }
469 469
470 err = -EINVAL; 470 err = -EINVAL;
diff --git a/fs/hpfs/map.c b/fs/hpfs/map.c
index e0e60b148400..7c49f1ef0c85 100644
--- a/fs/hpfs/map.c
+++ b/fs/hpfs/map.c
@@ -288,7 +288,7 @@ struct dnode *hpfs_map_dnode(struct super_block *s, unsigned secno,
288 goto bail; 288 goto bail;
289 } 289 }
290 if (((31 + de->namelen + de->down*4 + 3) & ~3) != le16_to_cpu(de->length)) { 290 if (((31 + de->namelen + de->down*4 + 3) & ~3) != le16_to_cpu(de->length)) {
291 if (((31 + de->namelen + de->down*4 + 3) & ~3) < le16_to_cpu(de->length) && s->s_flags & MS_RDONLY) goto ok; 291 if (((31 + de->namelen + de->down*4 + 3) & ~3) < le16_to_cpu(de->length) && s->s_flags & SB_RDONLY) goto ok;
292 hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); 292 hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp);
293 goto bail; 293 goto bail;
294 } 294 }
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 1516fb4e28f4..c45a3b9b9ac7 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -78,7 +78,7 @@ void hpfs_error(struct super_block *s, const char *fmt, ...)
78 else { 78 else {
79 pr_cont("; remounting read-only\n"); 79 pr_cont("; remounting read-only\n");
80 mark_dirty(s, 0); 80 mark_dirty(s, 0);
81 s->s_flags |= MS_RDONLY; 81 s->s_flags |= SB_RDONLY;
82 } 82 }
83 } else if (sb_rdonly(s)) 83 } else if (sb_rdonly(s))
84 pr_cont("; going on - but anything won't be destroyed because it's read-only\n"); 84 pr_cont("; going on - but anything won't be destroyed because it's read-only\n");
@@ -457,7 +457,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
457 457
458 sync_filesystem(s); 458 sync_filesystem(s);
459 459
460 *flags |= MS_NOATIME; 460 *flags |= SB_NOATIME;
461 461
462 hpfs_lock(s); 462 hpfs_lock(s);
463 uid = sbi->sb_uid; gid = sbi->sb_gid; 463 uid = sbi->sb_uid; gid = sbi->sb_gid;
@@ -488,7 +488,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
488 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk; 488 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk;
489 sbi->sb_err = errs; sbi->sb_timeshift = timeshift; 489 sbi->sb_err = errs; sbi->sb_timeshift = timeshift;
490 490
491 if (!(*flags & MS_RDONLY)) mark_dirty(s, 1); 491 if (!(*flags & SB_RDONLY)) mark_dirty(s, 1);
492 492
493 hpfs_unlock(s); 493 hpfs_unlock(s);
494 return 0; 494 return 0;
@@ -614,7 +614,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
614 goto bail4; 614 goto bail4;
615 } 615 }
616 616
617 s->s_flags |= MS_NOATIME; 617 s->s_flags |= SB_NOATIME;
618 618
619 /* Fill superblock stuff */ 619 /* Fill superblock stuff */
620 s->s_magic = HPFS_SUPER_MAGIC; 620 s->s_magic = HPFS_SUPER_MAGIC;
diff --git a/fs/inode.c b/fs/inode.c
index fd401028a309..03102d6ef044 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -416,7 +416,7 @@ void inode_add_lru(struct inode *inode)
416{ 416{
417 if (!(inode->i_state & (I_DIRTY_ALL | I_SYNC | 417 if (!(inode->i_state & (I_DIRTY_ALL | I_SYNC |
418 I_FREEING | I_WILL_FREE)) && 418 I_FREEING | I_WILL_FREE)) &&
419 !atomic_read(&inode->i_count) && inode->i_sb->s_flags & MS_ACTIVE) 419 !atomic_read(&inode->i_count) && inode->i_sb->s_flags & SB_ACTIVE)
420 inode_lru_list_add(inode); 420 inode_lru_list_add(inode);
421} 421}
422 422
@@ -595,7 +595,7 @@ static void dispose_list(struct list_head *head)
595 * @sb: superblock to operate on 595 * @sb: superblock to operate on
596 * 596 *
597 * Make sure that no inodes with zero refcount are retained. This is 597 * Make sure that no inodes with zero refcount are retained. This is
598 * called by superblock shutdown after having MS_ACTIVE flag removed, 598 * called by superblock shutdown after having SB_ACTIVE flag removed,
599 * so any inode reaching zero refcount during or after that call will 599 * so any inode reaching zero refcount during or after that call will
600 * be immediately evicted. 600 * be immediately evicted.
601 */ 601 */
@@ -1492,7 +1492,7 @@ static void iput_final(struct inode *inode)
1492 else 1492 else
1493 drop = generic_drop_inode(inode); 1493 drop = generic_drop_inode(inode);
1494 1494
1495 if (!drop && (sb->s_flags & MS_ACTIVE)) { 1495 if (!drop && (sb->s_flags & SB_ACTIVE)) {
1496 inode_add_lru(inode); 1496 inode_add_lru(inode);
1497 spin_unlock(&inode->i_lock); 1497 spin_unlock(&inode->i_lock);
1498 return; 1498 return;
@@ -1644,7 +1644,7 @@ int generic_update_time(struct inode *inode, struct timespec *time, int flags)
1644 if (flags & S_MTIME) 1644 if (flags & S_MTIME)
1645 inode->i_mtime = *time; 1645 inode->i_mtime = *time;
1646 1646
1647 if (!(inode->i_sb->s_flags & MS_LAZYTIME) || (flags & S_VERSION)) 1647 if (!(inode->i_sb->s_flags & SB_LAZYTIME) || (flags & S_VERSION))
1648 iflags |= I_DIRTY_SYNC; 1648 iflags |= I_DIRTY_SYNC;
1649 __mark_inode_dirty(inode, iflags); 1649 __mark_inode_dirty(inode, iflags);
1650 return 0; 1650 return 0;
@@ -1691,7 +1691,7 @@ bool __atime_needs_update(const struct path *path, struct inode *inode,
1691 1691
1692 if (IS_NOATIME(inode)) 1692 if (IS_NOATIME(inode))
1693 return false; 1693 return false;
1694 if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) 1694 if ((inode->i_sb->s_flags & SB_NODIRATIME) && S_ISDIR(inode->i_mode))
1695 return false; 1695 return false;
1696 1696
1697 if (mnt->mnt_flags & MNT_NOATIME) 1697 if (mnt->mnt_flags & MNT_NOATIME)
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 447a24d77b89..bc258a4402f6 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -114,7 +114,7 @@ static void destroy_inodecache(void)
114static int isofs_remount(struct super_block *sb, int *flags, char *data) 114static int isofs_remount(struct super_block *sb, int *flags, char *data)
115{ 115{
116 sync_filesystem(sb); 116 sync_filesystem(sb);
117 if (!(*flags & MS_RDONLY)) 117 if (!(*flags & SB_RDONLY))
118 return -EROFS; 118 return -EROFS;
119 return 0; 119 return 0;
120} 120}
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index e96c6b05e43e..d8c274d39ddb 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -409,10 +409,10 @@ int jffs2_do_remount_fs(struct super_block *sb, int *flags, char *data)
409 mutex_unlock(&c->alloc_sem); 409 mutex_unlock(&c->alloc_sem);
410 } 410 }
411 411
412 if (!(*flags & MS_RDONLY)) 412 if (!(*flags & SB_RDONLY))
413 jffs2_start_garbage_collect_thread(c); 413 jffs2_start_garbage_collect_thread(c);
414 414
415 *flags |= MS_NOATIME; 415 *flags |= SB_NOATIME;
416 return 0; 416 return 0;
417} 417}
418 418
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index 824e61ede465..c2fbec19c616 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -59,7 +59,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
59} 59}
60 60
61 61
62#define jffs2_is_readonly(c) (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY) 62#define jffs2_is_readonly(c) (OFNI_BS_2SFFJ(c)->s_flags & SB_RDONLY)
63 63
64#define SECTOR_ADDR(x) ( (((unsigned long)(x) / c->sector_size) * c->sector_size) ) 64#define SECTOR_ADDR(x) ( (((unsigned long)(x) / c->sector_size) * c->sector_size) )
65#ifndef CONFIG_JFFS2_FS_WRITEBUFFER 65#ifndef CONFIG_JFFS2_FS_WRITEBUFFER
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 153f1c6eb169..f60dee7faf03 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -301,10 +301,10 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
301 301
302 sb->s_op = &jffs2_super_operations; 302 sb->s_op = &jffs2_super_operations;
303 sb->s_export_op = &jffs2_export_ops; 303 sb->s_export_op = &jffs2_export_ops;
304 sb->s_flags = sb->s_flags | MS_NOATIME; 304 sb->s_flags = sb->s_flags | SB_NOATIME;
305 sb->s_xattr = jffs2_xattr_handlers; 305 sb->s_xattr = jffs2_xattr_handlers;
306#ifdef CONFIG_JFFS2_FS_POSIX_ACL 306#ifdef CONFIG_JFFS2_FS_POSIX_ACL
307 sb->s_flags |= MS_POSIXACL; 307 sb->s_flags |= SB_POSIXACL;
308#endif 308#endif
309 ret = jffs2_do_fill_super(sb, data, silent); 309 ret = jffs2_do_fill_super(sb, data, silent);
310 return ret; 310 return ret;
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 2f7b3af5b8b7..90373aebfdca 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -87,7 +87,7 @@ static void jfs_handle_error(struct super_block *sb)
87 else if (sbi->flag & JFS_ERR_REMOUNT_RO) { 87 else if (sbi->flag & JFS_ERR_REMOUNT_RO) {
88 jfs_err("ERROR: (device %s): remounting filesystem as read-only", 88 jfs_err("ERROR: (device %s): remounting filesystem as read-only",
89 sb->s_id); 89 sb->s_id);
90 sb->s_flags |= MS_RDONLY; 90 sb->s_flags |= SB_RDONLY;
91 } 91 }
92 92
93 /* nothing is done for continue beyond marking the superblock dirty */ 93 /* nothing is done for continue beyond marking the superblock dirty */
@@ -477,7 +477,7 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data)
477 return rc; 477 return rc;
478 } 478 }
479 479
480 if (sb_rdonly(sb) && !(*flags & MS_RDONLY)) { 480 if (sb_rdonly(sb) && !(*flags & SB_RDONLY)) {
481 /* 481 /*
482 * Invalidate any previously read metadata. fsck may have 482 * Invalidate any previously read metadata. fsck may have
483 * changed the on-disk data since we mounted r/o 483 * changed the on-disk data since we mounted r/o
@@ -488,12 +488,12 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data)
488 ret = jfs_mount_rw(sb, 1); 488 ret = jfs_mount_rw(sb, 1);
489 489
490 /* mark the fs r/w for quota activity */ 490 /* mark the fs r/w for quota activity */
491 sb->s_flags &= ~MS_RDONLY; 491 sb->s_flags &= ~SB_RDONLY;
492 492
493 dquot_resume(sb, -1); 493 dquot_resume(sb, -1);
494 return ret; 494 return ret;
495 } 495 }
496 if (!sb_rdonly(sb) && (*flags & MS_RDONLY)) { 496 if (!sb_rdonly(sb) && (*flags & SB_RDONLY)) {
497 rc = dquot_suspend(sb, -1); 497 rc = dquot_suspend(sb, -1);
498 if (rc < 0) 498 if (rc < 0)
499 return rc; 499 return rc;
@@ -545,7 +545,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
545 sbi->flag = flag; 545 sbi->flag = flag;
546 546
547#ifdef CONFIG_JFS_POSIX_ACL 547#ifdef CONFIG_JFS_POSIX_ACL
548 sb->s_flags |= MS_POSIXACL; 548 sb->s_flags |= SB_POSIXACL;
549#endif 549#endif
550 550
551 if (newLVSize) { 551 if (newLVSize) {
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index 95a7c88baed9..26dd9a50f383 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -335,7 +335,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags,
335 deactivate_locked_super(sb); 335 deactivate_locked_super(sb);
336 return ERR_PTR(error); 336 return ERR_PTR(error);
337 } 337 }
338 sb->s_flags |= MS_ACTIVE; 338 sb->s_flags |= SB_ACTIVE;
339 339
340 mutex_lock(&kernfs_mutex); 340 mutex_lock(&kernfs_mutex);
341 list_add(&info->node, &root->supers); 341 list_add(&info->node, &root->supers);
diff --git a/fs/libfs.c b/fs/libfs.c
index 3aabe553fc45..7ff3cb904acd 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -246,7 +246,7 @@ struct dentry *mount_pseudo_xattr(struct file_system_type *fs_type, char *name,
246 struct inode *root; 246 struct inode *root;
247 struct qstr d_name = QSTR_INIT(name, strlen(name)); 247 struct qstr d_name = QSTR_INIT(name, strlen(name));
248 248
249 s = sget_userns(fs_type, NULL, set_anon_super, MS_KERNMOUNT|MS_NOUSER, 249 s = sget_userns(fs_type, NULL, set_anon_super, SB_KERNMOUNT|SB_NOUSER,
250 &init_user_ns, NULL); 250 &init_user_ns, NULL);
251 if (IS_ERR(s)) 251 if (IS_ERR(s))
252 return ERR_CAST(s); 252 return ERR_CAST(s);
@@ -277,7 +277,7 @@ struct dentry *mount_pseudo_xattr(struct file_system_type *fs_type, char *name,
277 d_instantiate(dentry, root); 277 d_instantiate(dentry, root);
278 s->s_root = dentry; 278 s->s_root = dentry;
279 s->s_d_op = dops; 279 s->s_d_op = dops;
280 s->s_flags |= MS_ACTIVE; 280 s->s_flags |= SB_ACTIVE;
281 return dget(s->s_root); 281 return dget(s->s_root);
282 282
283Enomem: 283Enomem:
@@ -578,7 +578,7 @@ int simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *c
578 spin_lock(&pin_fs_lock); 578 spin_lock(&pin_fs_lock);
579 if (unlikely(!*mount)) { 579 if (unlikely(!*mount)) {
580 spin_unlock(&pin_fs_lock); 580 spin_unlock(&pin_fs_lock);
581 mnt = vfs_kern_mount(type, MS_KERNMOUNT, type->name, NULL); 581 mnt = vfs_kern_mount(type, SB_KERNMOUNT, type->name, NULL);
582 if (IS_ERR(mnt)) 582 if (IS_ERR(mnt))
583 return PTR_ERR(mnt); 583 return PTR_ERR(mnt);
584 spin_lock(&pin_fs_lock); 584 spin_lock(&pin_fs_lock);
diff --git a/fs/locks.c b/fs/locks.c
index 1bd71c4d663a..21b4dfa289ee 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -141,7 +141,7 @@
141 141
142static inline bool is_remote_lock(struct file *filp) 142static inline bool is_remote_lock(struct file *filp)
143{ 143{
144 return likely(!(filp->f_path.dentry->d_sb->s_flags & MS_NOREMOTELOCK)); 144 return likely(!(filp->f_path.dentry->d_sb->s_flags & SB_NOREMOTELOCK));
145} 145}
146 146
147static bool lease_breaking(struct file_lock *fl) 147static bool lease_breaking(struct file_lock *fl)
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index b6829d679643..72e308c3e66b 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -125,9 +125,9 @@ static int minix_remount (struct super_block * sb, int * flags, char * data)
125 125
126 sync_filesystem(sb); 126 sync_filesystem(sb);
127 ms = sbi->s_ms; 127 ms = sbi->s_ms;
128 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 128 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
129 return 0; 129 return 0;
130 if (*flags & MS_RDONLY) { 130 if (*flags & SB_RDONLY) {
131 if (ms->s_state & MINIX_VALID_FS || 131 if (ms->s_state & MINIX_VALID_FS ||
132 !(sbi->s_mount_state & MINIX_VALID_FS)) 132 !(sbi->s_mount_state & MINIX_VALID_FS))
133 return 0; 133 return 0;
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 129f1937fa2c..41de88cdc053 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -103,7 +103,7 @@ static void destroy_inodecache(void)
103static int ncp_remount(struct super_block *sb, int *flags, char* data) 103static int ncp_remount(struct super_block *sb, int *flags, char* data)
104{ 104{
105 sync_filesystem(sb); 105 sync_filesystem(sb);
106 *flags |= MS_NODIRATIME; 106 *flags |= SB_NODIRATIME;
107 return 0; 107 return 0;
108} 108}
109 109
@@ -547,7 +547,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
547 else 547 else
548 default_bufsize = 1024; 548 default_bufsize = 1024;
549 549
550 sb->s_flags |= MS_NODIRATIME; /* probably even noatime */ 550 sb->s_flags |= SB_NODIRATIME; /* probably even noatime */
551 sb->s_maxbytes = 0xFFFFFFFFU; 551 sb->s_maxbytes = 0xFFFFFFFFU;
552 sb->s_blocksize = 1024; /* Eh... Is this correct? */ 552 sb->s_blocksize = 1024; /* Eh... Is this correct? */
553 sb->s_blocksize_bits = 10; 553 sb->s_blocksize_bits = 10;
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index e51ae52ed14f..2f3f86726f5b 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1256,7 +1256,7 @@ static int nfs_dentry_delete(const struct dentry *dentry)
1256 /* Unhash it, so that ->d_iput() would be called */ 1256 /* Unhash it, so that ->d_iput() would be called */
1257 return 1; 1257 return 1;
1258 } 1258 }
1259 if (!(dentry->d_sb->s_flags & MS_ACTIVE)) { 1259 if (!(dentry->d_sb->s_flags & SB_ACTIVE)) {
1260 /* Unhash it, so that ancestors of killed async unlink 1260 /* Unhash it, so that ancestors of killed async unlink
1261 * files will be cleaned up during umount */ 1261 * files will be cleaned up during umount */
1262 return 1; 1262 return 1;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 38b93d54c02e..b992d2382ffa 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -752,7 +752,7 @@ int nfs_getattr(const struct path *path, struct kstat *stat,
752 * Note that we only have to check the vfsmount flags here: 752 * Note that we only have to check the vfsmount flags here:
753 * - NFS always sets S_NOATIME by so checking it would give a 753 * - NFS always sets S_NOATIME by so checking it would give a
754 * bogus result 754 * bogus result
755 * - NFS never sets MS_NOATIME or MS_NODIRATIME so there is 755 * - NFS never sets SB_NOATIME or SB_NODIRATIME so there is
756 * no point in checking those. 756 * no point in checking those.
757 */ 757 */
758 if ((path->mnt->mnt_flags & MNT_NOATIME) || 758 if ((path->mnt->mnt_flags & MNT_NOATIME) ||
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 5ab17fd4700a..8357ff69962f 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -10,7 +10,7 @@
10#include <linux/nfs_page.h> 10#include <linux/nfs_page.h>
11#include <linux/wait_bit.h> 11#include <linux/wait_bit.h>
12 12
13#define NFS_MS_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_SYNCHRONOUS) 13#define NFS_MS_MASK (SB_RDONLY|SB_NOSUID|SB_NODEV|SB_NOEXEC|SB_SYNCHRONOUS)
14 14
15extern const struct export_operations nfs_export_ops; 15extern const struct export_operations nfs_export_ops;
16 16
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 43cadb28db6e..29bacdc56f6a 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -813,9 +813,9 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
813 */ 813 */
814 seq_printf(m, "\n\topts:\t"); 814 seq_printf(m, "\n\topts:\t");
815 seq_puts(m, sb_rdonly(root->d_sb) ? "ro" : "rw"); 815 seq_puts(m, sb_rdonly(root->d_sb) ? "ro" : "rw");
816 seq_puts(m, root->d_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : ""); 816 seq_puts(m, root->d_sb->s_flags & SB_SYNCHRONOUS ? ",sync" : "");
817 seq_puts(m, root->d_sb->s_flags & MS_NOATIME ? ",noatime" : ""); 817 seq_puts(m, root->d_sb->s_flags & SB_NOATIME ? ",noatime" : "");
818 seq_puts(m, root->d_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); 818 seq_puts(m, root->d_sb->s_flags & SB_NODIRATIME ? ",nodiratime" : "");
819 nfs_show_mount_options(m, nfss, 1); 819 nfs_show_mount_options(m, nfss, 1);
820 820
821 seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); 821 seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ);
@@ -2296,11 +2296,11 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
2296 /* 2296 /*
2297 * noac is a special case. It implies -o sync, but that's not 2297 * noac is a special case. It implies -o sync, but that's not
2298 * necessarily reflected in the mtab options. do_remount_sb 2298 * necessarily reflected in the mtab options. do_remount_sb
2299 * will clear MS_SYNCHRONOUS if -o sync wasn't specified in the 2299 * will clear SB_SYNCHRONOUS if -o sync wasn't specified in the
2300 * remount options, so we have to explicitly reset it. 2300 * remount options, so we have to explicitly reset it.
2301 */ 2301 */
2302 if (data->flags & NFS_MOUNT_NOAC) 2302 if (data->flags & NFS_MOUNT_NOAC)
2303 *flags |= MS_SYNCHRONOUS; 2303 *flags |= SB_SYNCHRONOUS;
2304 2304
2305 /* compare new mount options with old ones */ 2305 /* compare new mount options with old ones */
2306 error = nfs_compare_remount_data(nfss, data); 2306 error = nfs_compare_remount_data(nfss, data);
@@ -2349,7 +2349,7 @@ void nfs_fill_super(struct super_block *sb, struct nfs_mount_info *mount_info)
2349 /* The VFS shouldn't apply the umask to mode bits. We will do 2349 /* The VFS shouldn't apply the umask to mode bits. We will do
2350 * so ourselves when necessary. 2350 * so ourselves when necessary.
2351 */ 2351 */
2352 sb->s_flags |= MS_POSIXACL; 2352 sb->s_flags |= SB_POSIXACL;
2353 sb->s_time_gran = 1; 2353 sb->s_time_gran = 1;
2354 sb->s_export_op = &nfs_export_ops; 2354 sb->s_export_op = &nfs_export_ops;
2355 } 2355 }
@@ -2379,7 +2379,7 @@ static void nfs_clone_super(struct super_block *sb,
2379 /* The VFS shouldn't apply the umask to mode bits. We will do 2379 /* The VFS shouldn't apply the umask to mode bits. We will do
2380 * so ourselves when necessary. 2380 * so ourselves when necessary.
2381 */ 2381 */
2382 sb->s_flags |= MS_POSIXACL; 2382 sb->s_flags |= SB_POSIXACL;
2383 } 2383 }
2384 2384
2385 nfs_initialise_sb(sb); 2385 nfs_initialise_sb(sb);
@@ -2600,11 +2600,11 @@ struct dentry *nfs_fs_mount_common(struct nfs_server *server,
2600 2600
2601 /* -o noac implies -o sync */ 2601 /* -o noac implies -o sync */
2602 if (server->flags & NFS_MOUNT_NOAC) 2602 if (server->flags & NFS_MOUNT_NOAC)
2603 sb_mntdata.mntflags |= MS_SYNCHRONOUS; 2603 sb_mntdata.mntflags |= SB_SYNCHRONOUS;
2604 2604
2605 if (mount_info->cloned != NULL && mount_info->cloned->sb != NULL) 2605 if (mount_info->cloned != NULL && mount_info->cloned->sb != NULL)
2606 if (mount_info->cloned->sb->s_flags & MS_SYNCHRONOUS) 2606 if (mount_info->cloned->sb->s_flags & SB_SYNCHRONOUS)
2607 sb_mntdata.mntflags |= MS_SYNCHRONOUS; 2607 sb_mntdata.mntflags |= SB_SYNCHRONOUS;
2608 2608
2609 /* Get a superblock - note that we may end up sharing one that already exists */ 2609 /* Get a superblock - note that we may end up sharing one that already exists */
2610 s = sget(nfs_mod->nfs_fs, compare_super, nfs_set_super, flags, &sb_mntdata); 2610 s = sget(nfs_mod->nfs_fs, compare_super, nfs_set_super, flags, &sb_mntdata);
@@ -2641,7 +2641,7 @@ struct dentry *nfs_fs_mount_common(struct nfs_server *server,
2641 if (error) 2641 if (error)
2642 goto error_splat_root; 2642 goto error_splat_root;
2643 2643
2644 s->s_flags |= MS_ACTIVE; 2644 s->s_flags |= SB_ACTIVE;
2645 2645
2646out: 2646out:
2647 return mntroot; 2647 return mntroot;
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index f572538dcc4f..9f3ffba41533 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1979,7 +1979,7 @@ static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci,
1979 struct the_nilfs *nilfs) 1979 struct the_nilfs *nilfs)
1980{ 1980{
1981 struct nilfs_inode_info *ii, *n; 1981 struct nilfs_inode_info *ii, *n;
1982 int during_mount = !(sci->sc_super->s_flags & MS_ACTIVE); 1982 int during_mount = !(sci->sc_super->s_flags & SB_ACTIVE);
1983 int defer_iput = false; 1983 int defer_iput = false;
1984 1984
1985 spin_lock(&nilfs->ns_inode_lock); 1985 spin_lock(&nilfs->ns_inode_lock);
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 3ce20cd44a20..3073b646e1ba 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -141,7 +141,7 @@ void __nilfs_error(struct super_block *sb, const char *function,
141 141
142 if (nilfs_test_opt(nilfs, ERRORS_RO)) { 142 if (nilfs_test_opt(nilfs, ERRORS_RO)) {
143 printk(KERN_CRIT "Remounting filesystem read-only\n"); 143 printk(KERN_CRIT "Remounting filesystem read-only\n");
144 sb->s_flags |= MS_RDONLY; 144 sb->s_flags |= SB_RDONLY;
145 } 145 }
146 } 146 }
147 147
@@ -869,7 +869,7 @@ int nilfs_store_magic_and_option(struct super_block *sb,
869 869
870 /* FS independent flags */ 870 /* FS independent flags */
871#ifdef NILFS_ATIME_DISABLE 871#ifdef NILFS_ATIME_DISABLE
872 sb->s_flags |= MS_NOATIME; 872 sb->s_flags |= SB_NOATIME;
873#endif 873#endif
874 874
875 nilfs_set_default_options(sb, sbp); 875 nilfs_set_default_options(sb, sbp);
@@ -1133,7 +1133,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
1133 err = -EINVAL; 1133 err = -EINVAL;
1134 goto restore_opts; 1134 goto restore_opts;
1135 } 1135 }
1136 sb->s_flags = (sb->s_flags & ~MS_POSIXACL); 1136 sb->s_flags = (sb->s_flags & ~SB_POSIXACL);
1137 1137
1138 err = -EINVAL; 1138 err = -EINVAL;
1139 1139
@@ -1143,12 +1143,12 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
1143 goto restore_opts; 1143 goto restore_opts;
1144 } 1144 }
1145 1145
1146 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 1146 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
1147 goto out; 1147 goto out;
1148 if (*flags & MS_RDONLY) { 1148 if (*flags & SB_RDONLY) {
1149 /* Shutting down log writer */ 1149 /* Shutting down log writer */
1150 nilfs_detach_log_writer(sb); 1150 nilfs_detach_log_writer(sb);
1151 sb->s_flags |= MS_RDONLY; 1151 sb->s_flags |= SB_RDONLY;
1152 1152
1153 /* 1153 /*
1154 * Remounting a valid RW partition RDONLY, so set 1154 * Remounting a valid RW partition RDONLY, so set
@@ -1178,7 +1178,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
1178 goto restore_opts; 1178 goto restore_opts;
1179 } 1179 }
1180 1180
1181 sb->s_flags &= ~MS_RDONLY; 1181 sb->s_flags &= ~SB_RDONLY;
1182 1182
1183 root = NILFS_I(d_inode(sb->s_root))->i_root; 1183 root = NILFS_I(d_inode(sb->s_root))->i_root;
1184 err = nilfs_attach_log_writer(sb, root); 1184 err = nilfs_attach_log_writer(sb, root);
@@ -1212,7 +1212,7 @@ static int nilfs_parse_snapshot_option(const char *option,
1212 const char *msg = NULL; 1212 const char *msg = NULL;
1213 int err; 1213 int err;
1214 1214
1215 if (!(sd->flags & MS_RDONLY)) { 1215 if (!(sd->flags & SB_RDONLY)) {
1216 msg = "read-only option is not specified"; 1216 msg = "read-only option is not specified";
1217 goto parse_error; 1217 goto parse_error;
1218 } 1218 }
@@ -1286,7 +1286,7 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
1286 struct dentry *root_dentry; 1286 struct dentry *root_dentry;
1287 int err, s_new = false; 1287 int err, s_new = false;
1288 1288
1289 if (!(flags & MS_RDONLY)) 1289 if (!(flags & SB_RDONLY))
1290 mode |= FMODE_WRITE; 1290 mode |= FMODE_WRITE;
1291 1291
1292 sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type); 1292 sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type);
@@ -1327,14 +1327,14 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
1327 snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev); 1327 snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev);
1328 sb_set_blocksize(s, block_size(sd.bdev)); 1328 sb_set_blocksize(s, block_size(sd.bdev));
1329 1329
1330 err = nilfs_fill_super(s, data, flags & MS_SILENT ? 1 : 0); 1330 err = nilfs_fill_super(s, data, flags & SB_SILENT ? 1 : 0);
1331 if (err) 1331 if (err)
1332 goto failed_super; 1332 goto failed_super;
1333 1333
1334 s->s_flags |= MS_ACTIVE; 1334 s->s_flags |= SB_ACTIVE;
1335 } else if (!sd.cno) { 1335 } else if (!sd.cno) {
1336 if (nilfs_tree_is_busy(s->s_root)) { 1336 if (nilfs_tree_is_busy(s->s_root)) {
1337 if ((flags ^ s->s_flags) & MS_RDONLY) { 1337 if ((flags ^ s->s_flags) & SB_RDONLY) {
1338 nilfs_msg(s, KERN_ERR, 1338 nilfs_msg(s, KERN_ERR,
1339 "the device already has a %s mount.", 1339 "the device already has a %s mount.",
1340 sb_rdonly(s) ? "read-only" : "read/write"); 1340 sb_rdonly(s) ? "read-only" : "read/write");
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index afebb5067cec..1a85317e83f0 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -220,7 +220,7 @@ int load_nilfs(struct the_nilfs *nilfs, struct super_block *sb)
220 220
221 if (!valid_fs) { 221 if (!valid_fs) {
222 nilfs_msg(sb, KERN_WARNING, "mounting unchecked fs"); 222 nilfs_msg(sb, KERN_WARNING, "mounting unchecked fs");
223 if (s_flags & MS_RDONLY) { 223 if (s_flags & SB_RDONLY) {
224 nilfs_msg(sb, KERN_INFO, 224 nilfs_msg(sb, KERN_INFO,
225 "recovery required for readonly filesystem"); 225 "recovery required for readonly filesystem");
226 nilfs_msg(sb, KERN_INFO, 226 nilfs_msg(sb, KERN_INFO,
@@ -286,7 +286,7 @@ int load_nilfs(struct the_nilfs *nilfs, struct super_block *sb)
286 if (valid_fs) 286 if (valid_fs)
287 goto skip_recovery; 287 goto skip_recovery;
288 288
289 if (s_flags & MS_RDONLY) { 289 if (s_flags & SB_RDONLY) {
290 __u64 features; 290 __u64 features;
291 291
292 if (nilfs_test_opt(nilfs, NORECOVERY)) { 292 if (nilfs_test_opt(nilfs, NORECOVERY)) {
@@ -309,7 +309,7 @@ int load_nilfs(struct the_nilfs *nilfs, struct super_block *sb)
309 err = -EROFS; 309 err = -EROFS;
310 goto failed_unload; 310 goto failed_unload;
311 } 311 }
312 sb->s_flags &= ~MS_RDONLY; 312 sb->s_flags &= ~SB_RDONLY;
313 } else if (nilfs_test_opt(nilfs, NORECOVERY)) { 313 } else if (nilfs_test_opt(nilfs, NORECOVERY)) {
314 nilfs_msg(sb, KERN_ERR, 314 nilfs_msg(sb, KERN_ERR,
315 "recovery cancelled because norecovery option was specified for a read/write mount"); 315 "recovery cancelled because norecovery option was specified for a read/write mount");
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 81d8959b6aef..219b269c737e 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -67,7 +67,7 @@ void fsnotify_unmount_inodes(struct super_block *sb)
67 67
68 /* 68 /*
69 * If i_count is zero, the inode cannot have any watches and 69 * If i_count is zero, the inode cannot have any watches and
70 * doing an __iget/iput with MS_ACTIVE clear would actually 70 * doing an __iget/iput with SB_ACTIVE clear would actually
71 * evict all inodes with zero i_count from icache which is 71 * evict all inodes with zero i_count from icache which is
72 * unnecessarily violent and may in fact be illegal to do. 72 * unnecessarily violent and may in fact be illegal to do.
73 */ 73 */
diff --git a/fs/nsfs.c b/fs/nsfs.c
index ef243e14b6eb..7c6f76d29f56 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -255,5 +255,5 @@ void __init nsfs_init(void)
255 nsfs_mnt = kern_mount(&nsfs); 255 nsfs_mnt = kern_mount(&nsfs);
256 if (IS_ERR(nsfs_mnt)) 256 if (IS_ERR(nsfs_mnt))
257 panic("can't set nsfs up\n"); 257 panic("can't set nsfs up\n");
258 nsfs_mnt->mnt_sb->s_flags &= ~MS_NOUSER; 258 nsfs_mnt->mnt_sb->s_flags &= ~SB_NOUSER;
259} 259}
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
index 3f70f041dbe9..bb7159f697f2 100644
--- a/fs/ntfs/super.c
+++ b/fs/ntfs/super.c
@@ -473,7 +473,7 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt)
473 473
474#ifndef NTFS_RW 474#ifndef NTFS_RW
475 /* For read-only compiled driver, enforce read-only flag. */ 475 /* For read-only compiled driver, enforce read-only flag. */
476 *flags |= MS_RDONLY; 476 *flags |= SB_RDONLY;
477#else /* NTFS_RW */ 477#else /* NTFS_RW */
478 /* 478 /*
479 * For the read-write compiled driver, if we are remounting read-write, 479 * For the read-write compiled driver, if we are remounting read-write,
@@ -487,7 +487,7 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt)
487 * When remounting read-only, mark the volume clean if no volume errors 487 * When remounting read-only, mark the volume clean if no volume errors
488 * have occurred. 488 * have occurred.
489 */ 489 */
490 if (sb_rdonly(sb) && !(*flags & MS_RDONLY)) { 490 if (sb_rdonly(sb) && !(*flags & SB_RDONLY)) {
491 static const char *es = ". Cannot remount read-write."; 491 static const char *es = ". Cannot remount read-write.";
492 492
493 /* Remounting read-write. */ 493 /* Remounting read-write. */
@@ -548,7 +548,7 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt)
548 NVolSetErrors(vol); 548 NVolSetErrors(vol);
549 return -EROFS; 549 return -EROFS;
550 } 550 }
551 } else if (!sb_rdonly(sb) && (*flags & MS_RDONLY)) { 551 } else if (!sb_rdonly(sb) && (*flags & SB_RDONLY)) {
552 /* Remounting read-only. */ 552 /* Remounting read-only. */
553 if (!NVolErrors(vol)) { 553 if (!NVolErrors(vol)) {
554 if (ntfs_clear_volume_flags(vol, VOLUME_IS_DIRTY)) 554 if (ntfs_clear_volume_flags(vol, VOLUME_IS_DIRTY))
@@ -1799,7 +1799,7 @@ static bool load_system_files(ntfs_volume *vol)
1799 es3); 1799 es3);
1800 goto iput_mirr_err_out; 1800 goto iput_mirr_err_out;
1801 } 1801 }
1802 sb->s_flags |= MS_RDONLY; 1802 sb->s_flags |= SB_RDONLY;
1803 ntfs_error(sb, "%s. Mounting read-only%s", 1803 ntfs_error(sb, "%s. Mounting read-only%s",
1804 !vol->mftmirr_ino ? es1 : es2, es3); 1804 !vol->mftmirr_ino ? es1 : es2, es3);
1805 } else 1805 } else
@@ -1937,7 +1937,7 @@ get_ctx_vol_failed:
1937 es1, es2); 1937 es1, es2);
1938 goto iput_vol_err_out; 1938 goto iput_vol_err_out;
1939 } 1939 }
1940 sb->s_flags |= MS_RDONLY; 1940 sb->s_flags |= SB_RDONLY;
1941 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 1941 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
1942 } else 1942 } else
1943 ntfs_warning(sb, "%s. Will not be able to remount " 1943 ntfs_warning(sb, "%s. Will not be able to remount "
@@ -1974,7 +1974,7 @@ get_ctx_vol_failed:
1974 } 1974 }
1975 goto iput_logfile_err_out; 1975 goto iput_logfile_err_out;
1976 } 1976 }
1977 sb->s_flags |= MS_RDONLY; 1977 sb->s_flags |= SB_RDONLY;
1978 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 1978 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
1979 } else 1979 } else
1980 ntfs_warning(sb, "%s. Will not be able to remount " 1980 ntfs_warning(sb, "%s. Will not be able to remount "
@@ -2019,7 +2019,7 @@ get_ctx_vol_failed:
2019 es1, es2); 2019 es1, es2);
2020 goto iput_root_err_out; 2020 goto iput_root_err_out;
2021 } 2021 }
2022 sb->s_flags |= MS_RDONLY; 2022 sb->s_flags |= SB_RDONLY;
2023 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2023 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2024 } else 2024 } else
2025 ntfs_warning(sb, "%s. Will not be able to remount " 2025 ntfs_warning(sb, "%s. Will not be able to remount "
@@ -2042,7 +2042,7 @@ get_ctx_vol_failed:
2042 goto iput_root_err_out; 2042 goto iput_root_err_out;
2043 } 2043 }
2044 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2044 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2045 sb->s_flags |= MS_RDONLY; 2045 sb->s_flags |= SB_RDONLY;
2046 /* 2046 /*
2047 * Do not set NVolErrors() because ntfs_remount() might manage 2047 * Do not set NVolErrors() because ntfs_remount() might manage
2048 * to set the dirty flag in which case all would be well. 2048 * to set the dirty flag in which case all would be well.
@@ -2055,7 +2055,7 @@ get_ctx_vol_failed:
2055 * If (still) a read-write mount, set the NT4 compatibility flag on 2055 * If (still) a read-write mount, set the NT4 compatibility flag on
2056 * newer NTFS version volumes. 2056 * newer NTFS version volumes.
2057 */ 2057 */
2058 if (!(sb->s_flags & MS_RDONLY) && (vol->major_ver > 1) && 2058 if (!(sb->s_flags & SB_RDONLY) && (vol->major_ver > 1) &&
2059 ntfs_set_volume_flags(vol, VOLUME_MOUNTED_ON_NT4)) { 2059 ntfs_set_volume_flags(vol, VOLUME_MOUNTED_ON_NT4)) {
2060 static const char *es1 = "Failed to set NT4 compatibility flag"; 2060 static const char *es1 = "Failed to set NT4 compatibility flag";
2061 static const char *es2 = ". Run chkdsk."; 2061 static const char *es2 = ". Run chkdsk.";
@@ -2069,7 +2069,7 @@ get_ctx_vol_failed:
2069 goto iput_root_err_out; 2069 goto iput_root_err_out;
2070 } 2070 }
2071 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2071 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2072 sb->s_flags |= MS_RDONLY; 2072 sb->s_flags |= SB_RDONLY;
2073 NVolSetErrors(vol); 2073 NVolSetErrors(vol);
2074 } 2074 }
2075#endif 2075#endif
@@ -2087,7 +2087,7 @@ get_ctx_vol_failed:
2087 goto iput_root_err_out; 2087 goto iput_root_err_out;
2088 } 2088 }
2089 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2089 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2090 sb->s_flags |= MS_RDONLY; 2090 sb->s_flags |= SB_RDONLY;
2091 NVolSetErrors(vol); 2091 NVolSetErrors(vol);
2092 } 2092 }
2093#endif /* NTFS_RW */ 2093#endif /* NTFS_RW */
@@ -2128,7 +2128,7 @@ get_ctx_vol_failed:
2128 es1, es2); 2128 es1, es2);
2129 goto iput_quota_err_out; 2129 goto iput_quota_err_out;
2130 } 2130 }
2131 sb->s_flags |= MS_RDONLY; 2131 sb->s_flags |= SB_RDONLY;
2132 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2132 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2133 } else 2133 } else
2134 ntfs_warning(sb, "%s. Will not be able to remount " 2134 ntfs_warning(sb, "%s. Will not be able to remount "
@@ -2150,7 +2150,7 @@ get_ctx_vol_failed:
2150 goto iput_quota_err_out; 2150 goto iput_quota_err_out;
2151 } 2151 }
2152 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2152 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2153 sb->s_flags |= MS_RDONLY; 2153 sb->s_flags |= SB_RDONLY;
2154 NVolSetErrors(vol); 2154 NVolSetErrors(vol);
2155 } 2155 }
2156 /* 2156 /*
@@ -2171,7 +2171,7 @@ get_ctx_vol_failed:
2171 es1, es2); 2171 es1, es2);
2172 goto iput_usnjrnl_err_out; 2172 goto iput_usnjrnl_err_out;
2173 } 2173 }
2174 sb->s_flags |= MS_RDONLY; 2174 sb->s_flags |= SB_RDONLY;
2175 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2175 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2176 } else 2176 } else
2177 ntfs_warning(sb, "%s. Will not be able to remount " 2177 ntfs_warning(sb, "%s. Will not be able to remount "
@@ -2194,7 +2194,7 @@ get_ctx_vol_failed:
2194 goto iput_usnjrnl_err_out; 2194 goto iput_usnjrnl_err_out;
2195 } 2195 }
2196 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2196 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2);
2197 sb->s_flags |= MS_RDONLY; 2197 sb->s_flags |= SB_RDONLY;
2198 NVolSetErrors(vol); 2198 NVolSetErrors(vol);
2199 } 2199 }
2200#endif /* NTFS_RW */ 2200#endif /* NTFS_RW */
@@ -2728,7 +2728,7 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
2728 lockdep_off(); 2728 lockdep_off();
2729 ntfs_debug("Entering."); 2729 ntfs_debug("Entering.");
2730#ifndef NTFS_RW 2730#ifndef NTFS_RW
2731 sb->s_flags |= MS_RDONLY; 2731 sb->s_flags |= SB_RDONLY;
2732#endif /* ! NTFS_RW */ 2732#endif /* ! NTFS_RW */
2733 /* Allocate a new ntfs_volume and place it in sb->s_fs_info. */ 2733 /* Allocate a new ntfs_volume and place it in sb->s_fs_info. */
2734 sb->s_fs_info = kmalloc(sizeof(ntfs_volume), GFP_NOFS); 2734 sb->s_fs_info = kmalloc(sizeof(ntfs_volume), GFP_NOFS);
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index dc455d45a66a..a1d051055472 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -227,7 +227,7 @@ int ocfs2_should_update_atime(struct inode *inode,
227 return 0; 227 return 0;
228 228
229 if ((inode->i_flags & S_NOATIME) || 229 if ((inode->i_flags & S_NOATIME) ||
230 ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))) 230 ((inode->i_sb->s_flags & SB_NODIRATIME) && S_ISDIR(inode->i_mode)))
231 return 0; 231 return 0;
232 232
233 /* 233 /*
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 040bbb6a6e4b..80efa5699fb0 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -675,9 +675,9 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data)
675 } 675 }
676 676
677 /* We're going to/from readonly mode. */ 677 /* We're going to/from readonly mode. */
678 if ((bool)(*flags & MS_RDONLY) != sb_rdonly(sb)) { 678 if ((bool)(*flags & SB_RDONLY) != sb_rdonly(sb)) {
679 /* Disable quota accounting before remounting RO */ 679 /* Disable quota accounting before remounting RO */
680 if (*flags & MS_RDONLY) { 680 if (*flags & SB_RDONLY) {
681 ret = ocfs2_susp_quotas(osb, 0); 681 ret = ocfs2_susp_quotas(osb, 0);
682 if (ret < 0) 682 if (ret < 0)
683 goto out; 683 goto out;
@@ -691,8 +691,8 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data)
691 goto unlock_osb; 691 goto unlock_osb;
692 } 692 }
693 693
694 if (*flags & MS_RDONLY) { 694 if (*flags & SB_RDONLY) {
695 sb->s_flags |= MS_RDONLY; 695 sb->s_flags |= SB_RDONLY;
696 osb->osb_flags |= OCFS2_OSB_SOFT_RO; 696 osb->osb_flags |= OCFS2_OSB_SOFT_RO;
697 } else { 697 } else {
698 if (osb->osb_flags & OCFS2_OSB_ERROR_FS) { 698 if (osb->osb_flags & OCFS2_OSB_ERROR_FS) {
@@ -709,14 +709,14 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data)
709 ret = -EINVAL; 709 ret = -EINVAL;
710 goto unlock_osb; 710 goto unlock_osb;
711 } 711 }
712 sb->s_flags &= ~MS_RDONLY; 712 sb->s_flags &= ~SB_RDONLY;
713 osb->osb_flags &= ~OCFS2_OSB_SOFT_RO; 713 osb->osb_flags &= ~OCFS2_OSB_SOFT_RO;
714 } 714 }
715 trace_ocfs2_remount(sb->s_flags, osb->osb_flags, *flags); 715 trace_ocfs2_remount(sb->s_flags, osb->osb_flags, *flags);
716unlock_osb: 716unlock_osb:
717 spin_unlock(&osb->osb_lock); 717 spin_unlock(&osb->osb_lock);
718 /* Enable quota accounting after remounting RW */ 718 /* Enable quota accounting after remounting RW */
719 if (!ret && !(*flags & MS_RDONLY)) { 719 if (!ret && !(*flags & SB_RDONLY)) {
720 if (sb_any_quota_suspended(sb)) 720 if (sb_any_quota_suspended(sb))
721 ret = ocfs2_susp_quotas(osb, 1); 721 ret = ocfs2_susp_quotas(osb, 1);
722 else 722 else
@@ -724,7 +724,7 @@ unlock_osb:
724 if (ret < 0) { 724 if (ret < 0) {
725 /* Return back changes... */ 725 /* Return back changes... */
726 spin_lock(&osb->osb_lock); 726 spin_lock(&osb->osb_lock);
727 sb->s_flags |= MS_RDONLY; 727 sb->s_flags |= SB_RDONLY;
728 osb->osb_flags |= OCFS2_OSB_SOFT_RO; 728 osb->osb_flags |= OCFS2_OSB_SOFT_RO;
729 spin_unlock(&osb->osb_lock); 729 spin_unlock(&osb->osb_lock);
730 goto out; 730 goto out;
@@ -744,9 +744,9 @@ unlock_osb:
744 if (!ocfs2_is_hard_readonly(osb)) 744 if (!ocfs2_is_hard_readonly(osb))
745 ocfs2_set_journal_params(osb); 745 ocfs2_set_journal_params(osb);
746 746
747 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 747 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
748 ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? 748 ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ?
749 MS_POSIXACL : 0); 749 SB_POSIXACL : 0);
750 } 750 }
751out: 751out:
752 return ret; 752 return ret;
@@ -1057,10 +1057,10 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
1057 1057
1058 sb->s_magic = OCFS2_SUPER_MAGIC; 1058 sb->s_magic = OCFS2_SUPER_MAGIC;
1059 1059
1060 sb->s_flags = (sb->s_flags & ~(MS_POSIXACL | MS_NOSEC)) | 1060 sb->s_flags = (sb->s_flags & ~(SB_POSIXACL | SB_NOSEC)) |
1061 ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); 1061 ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? SB_POSIXACL : 0);
1062 1062
1063 /* Hard readonly mode only if: bdev_read_only, MS_RDONLY, 1063 /* Hard readonly mode only if: bdev_read_only, SB_RDONLY,
1064 * heartbeat=none */ 1064 * heartbeat=none */
1065 if (bdev_read_only(sb->s_bdev)) { 1065 if (bdev_read_only(sb->s_bdev)) {
1066 if (!sb_rdonly(sb)) { 1066 if (!sb_rdonly(sb)) {
@@ -2057,7 +2057,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
2057 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; 2057 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP;
2058 sb->s_xattr = ocfs2_xattr_handlers; 2058 sb->s_xattr = ocfs2_xattr_handlers;
2059 sb->s_time_gran = 1; 2059 sb->s_time_gran = 1;
2060 sb->s_flags |= MS_NOATIME; 2060 sb->s_flags |= SB_NOATIME;
2061 /* this is needed to support O_LARGEFILE */ 2061 /* this is needed to support O_LARGEFILE */
2062 cbits = le32_to_cpu(di->id2.i_super.s_clustersize_bits); 2062 cbits = le32_to_cpu(di->id2.i_super.s_clustersize_bits);
2063 bbits = le32_to_cpu(di->id2.i_super.s_blocksize_bits); 2063 bbits = le32_to_cpu(di->id2.i_super.s_blocksize_bits);
@@ -2568,7 +2568,7 @@ static int ocfs2_handle_error(struct super_block *sb)
2568 return rv; 2568 return rv;
2569 2569
2570 pr_crit("OCFS2: File system is now read-only.\n"); 2570 pr_crit("OCFS2: File system is now read-only.\n");
2571 sb->s_flags |= MS_RDONLY; 2571 sb->s_flags |= SB_RDONLY;
2572 ocfs2_set_ro_flag(osb, 0); 2572 ocfs2_set_ro_flag(osb, 0);
2573 } 2573 }
2574 2574
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 5fdf269ba82e..c5898c59d411 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -901,7 +901,7 @@ static int ocfs2_xattr_list_entry(struct super_block *sb,
901 901
902 case OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS: 902 case OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS:
903 case OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT: 903 case OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT:
904 if (!(sb->s_flags & MS_POSIXACL)) 904 if (!(sb->s_flags & SB_POSIXACL))
905 return 0; 905 return 0;
906 break; 906 break;
907 907
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index 13215f26e321..2200662a9bf1 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -369,7 +369,7 @@ static struct inode *openprom_iget(struct super_block *sb, ino_t ino)
369static int openprom_remount(struct super_block *sb, int *flags, char *data) 369static int openprom_remount(struct super_block *sb, int *flags, char *data)
370{ 370{
371 sync_filesystem(sb); 371 sync_filesystem(sb);
372 *flags |= MS_NOATIME; 372 *flags |= SB_NOATIME;
373 return 0; 373 return 0;
374} 374}
375 375
@@ -386,7 +386,7 @@ static int openprom_fill_super(struct super_block *s, void *data, int silent)
386 struct op_inode_info *oi; 386 struct op_inode_info *oi;
387 int ret; 387 int ret;
388 388
389 s->s_flags |= MS_NOATIME; 389 s->s_flags |= SB_NOATIME;
390 s->s_blocksize = 1024; 390 s->s_blocksize = 1024;
391 s->s_blocksize_bits = 10; 391 s->s_blocksize_bits = 10;
392 s->s_magic = OPENPROM_SUPER_MAGIC; 392 s->s_magic = OPENPROM_SUPER_MAGIC;
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index 366750eef201..36f1390b5ed7 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -40,7 +40,7 @@ static int orangefs_show_options(struct seq_file *m, struct dentry *root)
40{ 40{
41 struct orangefs_sb_info_s *orangefs_sb = ORANGEFS_SB(root->d_sb); 41 struct orangefs_sb_info_s *orangefs_sb = ORANGEFS_SB(root->d_sb);
42 42
43 if (root->d_sb->s_flags & MS_POSIXACL) 43 if (root->d_sb->s_flags & SB_POSIXACL)
44 seq_puts(m, ",acl"); 44 seq_puts(m, ",acl");
45 if (orangefs_sb->flags & ORANGEFS_OPT_INTR) 45 if (orangefs_sb->flags & ORANGEFS_OPT_INTR)
46 seq_puts(m, ",intr"); 46 seq_puts(m, ",intr");
@@ -60,7 +60,7 @@ static int parse_mount_options(struct super_block *sb, char *options,
60 * Force any potential flags that might be set from the mount 60 * Force any potential flags that might be set from the mount
61 * to zero, ie, initialize to unset. 61 * to zero, ie, initialize to unset.
62 */ 62 */
63 sb->s_flags &= ~MS_POSIXACL; 63 sb->s_flags &= ~SB_POSIXACL;
64 orangefs_sb->flags &= ~ORANGEFS_OPT_INTR; 64 orangefs_sb->flags &= ~ORANGEFS_OPT_INTR;
65 orangefs_sb->flags &= ~ORANGEFS_OPT_LOCAL_LOCK; 65 orangefs_sb->flags &= ~ORANGEFS_OPT_LOCAL_LOCK;
66 66
@@ -73,7 +73,7 @@ static int parse_mount_options(struct super_block *sb, char *options,
73 token = match_token(p, tokens, args); 73 token = match_token(p, tokens, args);
74 switch (token) { 74 switch (token) {
75 case Opt_acl: 75 case Opt_acl:
76 sb->s_flags |= MS_POSIXACL; 76 sb->s_flags |= SB_POSIXACL;
77 break; 77 break;
78 case Opt_intr: 78 case Opt_intr:
79 orangefs_sb->flags |= ORANGEFS_OPT_INTR; 79 orangefs_sb->flags |= ORANGEFS_OPT_INTR;
@@ -507,7 +507,7 @@ struct dentry *orangefs_mount(struct file_system_type *fst,
507 507
508 ret = orangefs_fill_sb(sb, 508 ret = orangefs_fill_sb(sb,
509 &new_op->downcall.resp.fs_mount, data, 509 &new_op->downcall.resp.fs_mount, data,
510 flags & MS_SILENT ? 1 : 0); 510 flags & SB_SILENT ? 1 : 0);
511 511
512 if (ret) { 512 if (ret) {
513 d = ERR_PTR(ret); 513 d = ERR_PTR(ret);
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index be03578181d2..288d20f9a55a 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -326,7 +326,7 @@ static int ovl_remount(struct super_block *sb, int *flags, char *data)
326{ 326{
327 struct ovl_fs *ofs = sb->s_fs_info; 327 struct ovl_fs *ofs = sb->s_fs_info;
328 328
329 if (!(*flags & MS_RDONLY) && ovl_force_readonly(ofs)) 329 if (!(*flags & SB_RDONLY) && ovl_force_readonly(ofs))
330 return -EROFS; 330 return -EROFS;
331 331
332 return 0; 332 return 0;
@@ -1190,7 +1190,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
1190 goto out_err; 1190 goto out_err;
1191 1191
1192 if (!ofs->workdir) 1192 if (!ofs->workdir)
1193 sb->s_flags |= MS_RDONLY; 1193 sb->s_flags |= SB_RDONLY;
1194 1194
1195 sb->s_stack_depth = ofs->upper_mnt->mnt_sb->s_stack_depth; 1195 sb->s_stack_depth = ofs->upper_mnt->mnt_sb->s_stack_depth;
1196 sb->s_time_gran = ofs->upper_mnt->mnt_sb->s_time_gran; 1196 sb->s_time_gran = ofs->upper_mnt->mnt_sb->s_time_gran;
@@ -1203,7 +1203,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
1203 1203
1204 /* If the upper fs is nonexistent, we mark overlayfs r/o too */ 1204 /* If the upper fs is nonexistent, we mark overlayfs r/o too */
1205 if (!ofs->upper_mnt) 1205 if (!ofs->upper_mnt)
1206 sb->s_flags |= MS_RDONLY; 1206 sb->s_flags |= SB_RDONLY;
1207 else if (ofs->upper_mnt->mnt_sb != ofs->same_sb) 1207 else if (ofs->upper_mnt->mnt_sb != ofs->same_sb)
1208 ofs->same_sb = NULL; 1208 ofs->same_sb = NULL;
1209 1209
@@ -1213,7 +1213,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
1213 goto out_free_oe; 1213 goto out_free_oe;
1214 1214
1215 if (!ofs->indexdir) 1215 if (!ofs->indexdir)
1216 sb->s_flags |= MS_RDONLY; 1216 sb->s_flags |= SB_RDONLY;
1217 } 1217 }
1218 1218
1219 /* Show index=off/on in /proc/mounts for any of the reasons above */ 1219 /* Show index=off/on in /proc/mounts for any of the reasons above */
@@ -1227,7 +1227,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
1227 sb->s_op = &ovl_super_operations; 1227 sb->s_op = &ovl_super_operations;
1228 sb->s_xattr = ovl_xattr_handlers; 1228 sb->s_xattr = ovl_xattr_handlers;
1229 sb->s_fs_info = ofs; 1229 sb->s_fs_info = ofs;
1230 sb->s_flags |= MS_POSIXACL | MS_NOREMOTELOCK; 1230 sb->s_flags |= SB_POSIXACL | SB_NOREMOTELOCK;
1231 1231
1232 err = -ENOMEM; 1232 err = -ENOMEM;
1233 root_dentry = d_make_root(ovl_new_inode(sb, S_IFDIR, 0)); 1233 root_dentry = d_make_root(ovl_new_inode(sb, S_IFDIR, 0));
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 225f541f7078..dd0f82622427 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -483,7 +483,7 @@ int proc_fill_super(struct super_block *s, void *data, int silent)
483 483
484 /* User space would break if executables or devices appear on proc */ 484 /* User space would break if executables or devices appear on proc */
485 s->s_iflags |= SB_I_USERNS_VISIBLE | SB_I_NOEXEC | SB_I_NODEV; 485 s->s_iflags |= SB_I_USERNS_VISIBLE | SB_I_NOEXEC | SB_I_NODEV;
486 s->s_flags |= MS_NODIRATIME | MS_NOSUID | MS_NOEXEC; 486 s->s_flags |= SB_NODIRATIME | SB_NOSUID | SB_NOEXEC;
487 s->s_blocksize = 1024; 487 s->s_blocksize = 1024;
488 s->s_blocksize_bits = 10; 488 s->s_blocksize_bits = 10;
489 s->s_magic = PROC_SUPER_MAGIC; 489 s->s_magic = PROC_SUPER_MAGIC;
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 4e42aba97f2e..ede8e64974be 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -91,7 +91,7 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
91{ 91{
92 struct pid_namespace *ns; 92 struct pid_namespace *ns;
93 93
94 if (flags & MS_KERNMOUNT) { 94 if (flags & SB_KERNMOUNT) {
95 ns = data; 95 ns = data;
96 data = NULL; 96 data = NULL;
97 } else { 97 } else {
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 7b635d173213..b786840facd9 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -45,10 +45,10 @@ struct proc_fs_info {
45static int show_sb_opts(struct seq_file *m, struct super_block *sb) 45static int show_sb_opts(struct seq_file *m, struct super_block *sb)
46{ 46{
47 static const struct proc_fs_info fs_info[] = { 47 static const struct proc_fs_info fs_info[] = {
48 { MS_SYNCHRONOUS, ",sync" }, 48 { SB_SYNCHRONOUS, ",sync" },
49 { MS_DIRSYNC, ",dirsync" }, 49 { SB_DIRSYNC, ",dirsync" },
50 { MS_MANDLOCK, ",mand" }, 50 { SB_MANDLOCK, ",mand" },
51 { MS_LAZYTIME, ",lazytime" }, 51 { SB_LAZYTIME, ",lazytime" },
52 { 0, NULL } 52 { 0, NULL }
53 }; 53 };
54 const struct proc_fs_info *fs_infop; 54 const struct proc_fs_info *fs_infop;
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index 3a67cfb142d8..3d46fe302fcb 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -47,7 +47,7 @@ static int qnx4_remount(struct super_block *sb, int *flags, char *data)
47 sync_filesystem(sb); 47 sync_filesystem(sb);
48 qs = qnx4_sb(sb); 48 qs = qnx4_sb(sb);
49 qs->Version = QNX4_VERSION; 49 qs->Version = QNX4_VERSION;
50 *flags |= MS_RDONLY; 50 *flags |= SB_RDONLY;
51 return 0; 51 return 0;
52} 52}
53 53
@@ -199,7 +199,7 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent)
199 199
200 s->s_op = &qnx4_sops; 200 s->s_op = &qnx4_sops;
201 s->s_magic = QNX4_SUPER_MAGIC; 201 s->s_magic = QNX4_SUPER_MAGIC;
202 s->s_flags |= MS_RDONLY; /* Yup, read-only yet */ 202 s->s_flags |= SB_RDONLY; /* Yup, read-only yet */
203 203
204 /* Check the superblock signature. Since the qnx4 code is 204 /* Check the superblock signature. Since the qnx4 code is
205 dangerous, we should leave as quickly as possible 205 dangerous, we should leave as quickly as possible
diff --git a/fs/qnx6/inode.c b/fs/qnx6/inode.c
index 1192422a1c56..4aeb26bcb4d0 100644
--- a/fs/qnx6/inode.c
+++ b/fs/qnx6/inode.c
@@ -56,7 +56,7 @@ static int qnx6_show_options(struct seq_file *seq, struct dentry *root)
56static int qnx6_remount(struct super_block *sb, int *flags, char *data) 56static int qnx6_remount(struct super_block *sb, int *flags, char *data)
57{ 57{
58 sync_filesystem(sb); 58 sync_filesystem(sb);
59 *flags |= MS_RDONLY; 59 *flags |= SB_RDONLY;
60 return 0; 60 return 0;
61} 61}
62 62
@@ -427,7 +427,7 @@ mmi_success:
427 } 427 }
428 s->s_op = &qnx6_sops; 428 s->s_op = &qnx6_sops;
429 s->s_magic = QNX6_SUPER_MAGIC; 429 s->s_magic = QNX6_SUPER_MAGIC;
430 s->s_flags |= MS_RDONLY; /* Yup, read-only yet */ 430 s->s_flags |= SB_RDONLY; /* Yup, read-only yet */
431 431
432 /* ease the later tree level calculations */ 432 /* ease the later tree level calculations */
433 sbi = QNX6_SB(s); 433 sbi = QNX6_SB(s);
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 11a48affa882..b13fc024d2ee 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -2106,7 +2106,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
2106 journal_end(th); 2106 journal_end(th);
2107 goto out_inserted_sd; 2107 goto out_inserted_sd;
2108 } 2108 }
2109 } else if (inode->i_sb->s_flags & MS_POSIXACL) { 2109 } else if (inode->i_sb->s_flags & SB_POSIXACL) {
2110 reiserfs_warning(inode->i_sb, "jdm-13090", 2110 reiserfs_warning(inode->i_sb, "jdm-13090",
2111 "ACLs aren't enabled in the fs, " 2111 "ACLs aren't enabled in the fs, "
2112 "but vfs thinks they are!"); 2112 "but vfs thinks they are!");
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 69ff280bdfe8..70057359fbaf 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -1960,7 +1960,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th,
1960 /* 1960 /*
1961 * Cancel flushing of old commits. Note that neither of these works 1961 * Cancel flushing of old commits. Note that neither of these works
1962 * will be requeued because superblock is being shutdown and doesn't 1962 * will be requeued because superblock is being shutdown and doesn't
1963 * have MS_ACTIVE set. 1963 * have SB_ACTIVE set.
1964 */ 1964 */
1965 reiserfs_cancel_old_flush(sb); 1965 reiserfs_cancel_old_flush(sb);
1966 /* wait for all commits to finish */ 1966 /* wait for all commits to finish */
@@ -4302,7 +4302,7 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, int flags)
4302 * Avoid queueing work when sb is being shut down. Transaction 4302 * Avoid queueing work when sb is being shut down. Transaction
4303 * will be flushed on journal shutdown. 4303 * will be flushed on journal shutdown.
4304 */ 4304 */
4305 if (sb->s_flags & MS_ACTIVE) 4305 if (sb->s_flags & SB_ACTIVE)
4306 queue_delayed_work(REISERFS_SB(sb)->commit_wq, 4306 queue_delayed_work(REISERFS_SB(sb)->commit_wq,
4307 &journal->j_work, HZ / 10); 4307 &journal->j_work, HZ / 10);
4308 } 4308 }
@@ -4393,7 +4393,7 @@ void reiserfs_abort_journal(struct super_block *sb, int errno)
4393 if (!journal->j_errno) 4393 if (!journal->j_errno)
4394 journal->j_errno = errno; 4394 journal->j_errno = errno;
4395 4395
4396 sb->s_flags |= MS_RDONLY; 4396 sb->s_flags |= SB_RDONLY;
4397 set_bit(J_ABORTED, &journal->j_state); 4397 set_bit(J_ABORTED, &journal->j_state);
4398 4398
4399#ifdef CONFIG_REISERFS_CHECK 4399#ifdef CONFIG_REISERFS_CHECK
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index 64f49cafbc5b..7e288d97adcb 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -390,7 +390,7 @@ void __reiserfs_error(struct super_block *sb, const char *id,
390 return; 390 return;
391 391
392 reiserfs_info(sb, "Remounting filesystem read-only\n"); 392 reiserfs_info(sb, "Remounting filesystem read-only\n");
393 sb->s_flags |= MS_RDONLY; 393 sb->s_flags |= SB_RDONLY;
394 reiserfs_abort_journal(sb, -EIO); 394 reiserfs_abort_journal(sb, -EIO);
395} 395}
396 396
@@ -409,7 +409,7 @@ void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...)
409 printk(KERN_CRIT "REISERFS abort (device %s): %s\n", sb->s_id, 409 printk(KERN_CRIT "REISERFS abort (device %s): %s\n", sb->s_id,
410 error_buf); 410 error_buf);
411 411
412 sb->s_flags |= MS_RDONLY; 412 sb->s_flags |= SB_RDONLY;
413 reiserfs_abort_journal(sb, errno); 413 reiserfs_abort_journal(sb, errno);
414} 414}
415 415
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 5464ec517702..020c9cacbb2f 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -121,7 +121,7 @@ void reiserfs_schedule_old_flush(struct super_block *s)
121 * Avoid scheduling flush when sb is being shut down. It can race 121 * Avoid scheduling flush when sb is being shut down. It can race
122 * with journal shutdown and free still queued delayed work. 122 * with journal shutdown and free still queued delayed work.
123 */ 123 */
124 if (sb_rdonly(s) || !(s->s_flags & MS_ACTIVE)) 124 if (sb_rdonly(s) || !(s->s_flags & SB_ACTIVE))
125 return; 125 return;
126 126
127 spin_lock(&sbi->old_work_lock); 127 spin_lock(&sbi->old_work_lock);
@@ -252,11 +252,11 @@ static int finish_unfinished(struct super_block *s)
252 252
253#ifdef CONFIG_QUOTA 253#ifdef CONFIG_QUOTA
254 /* Needed for iput() to work correctly and not trash data */ 254 /* Needed for iput() to work correctly and not trash data */
255 if (s->s_flags & MS_ACTIVE) { 255 if (s->s_flags & SB_ACTIVE) {
256 ms_active_set = 0; 256 ms_active_set = 0;
257 } else { 257 } else {
258 ms_active_set = 1; 258 ms_active_set = 1;
259 s->s_flags |= MS_ACTIVE; 259 s->s_flags |= SB_ACTIVE;
260 } 260 }
261 /* Turn on quotas so that they are updated correctly */ 261 /* Turn on quotas so that they are updated correctly */
262 for (i = 0; i < REISERFS_MAXQUOTAS; i++) { 262 for (i = 0; i < REISERFS_MAXQUOTAS; i++) {
@@ -411,7 +411,7 @@ static int finish_unfinished(struct super_block *s)
411 reiserfs_write_lock(s); 411 reiserfs_write_lock(s);
412 if (ms_active_set) 412 if (ms_active_set)
413 /* Restore the flag back */ 413 /* Restore the flag back */
414 s->s_flags &= ~MS_ACTIVE; 414 s->s_flags &= ~SB_ACTIVE;
415#endif 415#endif
416 pathrelse(&path); 416 pathrelse(&path);
417 if (done) 417 if (done)
@@ -1521,7 +1521,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
1521 goto out_err_unlock; 1521 goto out_err_unlock;
1522 } 1522 }
1523 1523
1524 if (*mount_flags & MS_RDONLY) { 1524 if (*mount_flags & SB_RDONLY) {
1525 reiserfs_write_unlock(s); 1525 reiserfs_write_unlock(s);
1526 reiserfs_xattr_init(s, *mount_flags); 1526 reiserfs_xattr_init(s, *mount_flags);
1527 /* remount read-only */ 1527 /* remount read-only */
@@ -1567,7 +1567,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
1567 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); 1567 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs);
1568 1568
1569 /* now it is safe to call journal_begin */ 1569 /* now it is safe to call journal_begin */
1570 s->s_flags &= ~MS_RDONLY; 1570 s->s_flags &= ~SB_RDONLY;
1571 err = journal_begin(&th, s, 10); 1571 err = journal_begin(&th, s, 10);
1572 if (err) 1572 if (err)
1573 goto out_err_unlock; 1573 goto out_err_unlock;
@@ -1575,7 +1575,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
1575 /* Mount a partition which is read-only, read-write */ 1575 /* Mount a partition which is read-only, read-write */
1576 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1); 1576 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
1577 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); 1577 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs);
1578 s->s_flags &= ~MS_RDONLY; 1578 s->s_flags &= ~SB_RDONLY;
1579 set_sb_umount_state(rs, REISERFS_ERROR_FS); 1579 set_sb_umount_state(rs, REISERFS_ERROR_FS);
1580 if (!old_format_only(s)) 1580 if (!old_format_only(s))
1581 set_sb_mnt_count(rs, sb_mnt_count(rs) + 1); 1581 set_sb_mnt_count(rs, sb_mnt_count(rs) + 1);
@@ -1590,7 +1590,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
1590 goto out_err_unlock; 1590 goto out_err_unlock;
1591 1591
1592 reiserfs_write_unlock(s); 1592 reiserfs_write_unlock(s);
1593 if (!(*mount_flags & MS_RDONLY)) { 1593 if (!(*mount_flags & SB_RDONLY)) {
1594 dquot_resume(s, -1); 1594 dquot_resume(s, -1);
1595 reiserfs_write_lock(s); 1595 reiserfs_write_lock(s);
1596 finish_unfinished(s); 1596 finish_unfinished(s);
@@ -2055,7 +2055,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
2055 if (bdev_read_only(s->s_bdev) && !sb_rdonly(s)) { 2055 if (bdev_read_only(s->s_bdev) && !sb_rdonly(s)) {
2056 SWARN(silent, s, "clm-7000", 2056 SWARN(silent, s, "clm-7000",
2057 "Detected readonly device, marking FS readonly"); 2057 "Detected readonly device, marking FS readonly");
2058 s->s_flags |= MS_RDONLY; 2058 s->s_flags |= SB_RDONLY;
2059 } 2059 }
2060 args.objectid = REISERFS_ROOT_OBJECTID; 2060 args.objectid = REISERFS_ROOT_OBJECTID;
2061 args.dirid = REISERFS_ROOT_PARENT_OBJECTID; 2061 args.dirid = REISERFS_ROOT_PARENT_OBJECTID;
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 46492fb37a4c..5dbf5324bdda 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -959,7 +959,7 @@ int reiserfs_lookup_privroot(struct super_block *s)
959 959
960/* 960/*
961 * We need to take a copy of the mount flags since things like 961 * We need to take a copy of the mount flags since things like
962 * MS_RDONLY don't get set until *after* we're called. 962 * SB_RDONLY don't get set until *after* we're called.
963 * mount_flags != mount_options 963 * mount_flags != mount_options
964 */ 964 */
965int reiserfs_xattr_init(struct super_block *s, int mount_flags) 965int reiserfs_xattr_init(struct super_block *s, int mount_flags)
@@ -971,7 +971,7 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags)
971 if (err) 971 if (err)
972 goto error; 972 goto error;
973 973
974 if (d_really_is_negative(privroot) && !(mount_flags & MS_RDONLY)) { 974 if (d_really_is_negative(privroot) && !(mount_flags & SB_RDONLY)) {
975 inode_lock(d_inode(s->s_root)); 975 inode_lock(d_inode(s->s_root));
976 err = create_privroot(REISERFS_SB(s)->priv_root); 976 err = create_privroot(REISERFS_SB(s)->priv_root);
977 inode_unlock(d_inode(s->s_root)); 977 inode_unlock(d_inode(s->s_root));
@@ -999,11 +999,11 @@ error:
999 clear_bit(REISERFS_POSIXACL, &REISERFS_SB(s)->s_mount_opt); 999 clear_bit(REISERFS_POSIXACL, &REISERFS_SB(s)->s_mount_opt);
1000 } 1000 }
1001 1001
1002 /* The super_block MS_POSIXACL must mirror the (no)acl mount option. */ 1002 /* The super_block SB_POSIXACL must mirror the (no)acl mount option. */
1003 if (reiserfs_posixacl(s)) 1003 if (reiserfs_posixacl(s))
1004 s->s_flags |= MS_POSIXACL; 1004 s->s_flags |= SB_POSIXACL;
1005 else 1005 else
1006 s->s_flags &= ~MS_POSIXACL; 1006 s->s_flags &= ~SB_POSIXACL;
1007 1007
1008 return err; 1008 return err;
1009} 1009}
diff --git a/fs/romfs/super.c b/fs/romfs/super.c
index 0186fe6d39f3..8f06fd1f3d69 100644
--- a/fs/romfs/super.c
+++ b/fs/romfs/super.c
@@ -451,7 +451,7 @@ static int romfs_statfs(struct dentry *dentry, struct kstatfs *buf)
451static int romfs_remount(struct super_block *sb, int *flags, char *data) 451static int romfs_remount(struct super_block *sb, int *flags, char *data)
452{ 452{
453 sync_filesystem(sb); 453 sync_filesystem(sb);
454 *flags |= MS_RDONLY; 454 *flags |= SB_RDONLY;
455 return 0; 455 return 0;
456} 456}
457 457
@@ -502,7 +502,7 @@ static int romfs_fill_super(struct super_block *sb, void *data, int silent)
502 502
503 sb->s_maxbytes = 0xFFFFFFFF; 503 sb->s_maxbytes = 0xFFFFFFFF;
504 sb->s_magic = ROMFS_MAGIC; 504 sb->s_magic = ROMFS_MAGIC;
505 sb->s_flags |= MS_RDONLY | MS_NOATIME; 505 sb->s_flags |= SB_RDONLY | SB_NOATIME;
506 sb->s_op = &romfs_super_ops; 506 sb->s_op = &romfs_super_ops;
507 507
508#ifdef CONFIG_ROMFS_ON_MTD 508#ifdef CONFIG_ROMFS_ON_MTD
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index cf01e15a7b16..8a73b97217c8 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -195,7 +195,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
195 (u64) le64_to_cpu(sblk->id_table_start)); 195 (u64) le64_to_cpu(sblk->id_table_start));
196 196
197 sb->s_maxbytes = MAX_LFS_FILESIZE; 197 sb->s_maxbytes = MAX_LFS_FILESIZE;
198 sb->s_flags |= MS_RDONLY; 198 sb->s_flags |= SB_RDONLY;
199 sb->s_op = &squashfs_super_ops; 199 sb->s_op = &squashfs_super_ops;
200 200
201 err = -ENOMEM; 201 err = -ENOMEM;
@@ -373,7 +373,7 @@ static int squashfs_statfs(struct dentry *dentry, struct kstatfs *buf)
373static int squashfs_remount(struct super_block *sb, int *flags, char *data) 373static int squashfs_remount(struct super_block *sb, int *flags, char *data)
374{ 374{
375 sync_filesystem(sb); 375 sync_filesystem(sb);
376 *flags |= MS_RDONLY; 376 *flags |= SB_RDONLY;
377 return 0; 377 return 0;
378} 378}
379 379
diff --git a/fs/statfs.c b/fs/statfs.c
index b072a8bab71a..5b2a24f0f263 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -35,11 +35,11 @@ static int flags_by_mnt(int mnt_flags)
35static int flags_by_sb(int s_flags) 35static int flags_by_sb(int s_flags)
36{ 36{
37 int flags = 0; 37 int flags = 0;
38 if (s_flags & MS_SYNCHRONOUS) 38 if (s_flags & SB_SYNCHRONOUS)
39 flags |= ST_SYNCHRONOUS; 39 flags |= ST_SYNCHRONOUS;
40 if (s_flags & MS_MANDLOCK) 40 if (s_flags & SB_MANDLOCK)
41 flags |= ST_MANDLOCK; 41 flags |= ST_MANDLOCK;
42 if (s_flags & MS_RDONLY) 42 if (s_flags & SB_RDONLY)
43 flags |= ST_RDONLY; 43 flags |= ST_RDONLY;
44 return flags; 44 return flags;
45} 45}
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 20b8f82e115b..fb49510c5dcf 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -30,7 +30,7 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type,
30 void *ns; 30 void *ns;
31 bool new_sb; 31 bool new_sb;
32 32
33 if (!(flags & MS_KERNMOUNT)) { 33 if (!(flags & SB_KERNMOUNT)) {
34 if (!kobj_ns_current_may_mount(KOBJ_NS_TYPE_NET)) 34 if (!kobj_ns_current_may_mount(KOBJ_NS_TYPE_NET))
35 return ERR_PTR(-EPERM); 35 return ERR_PTR(-EPERM);
36 } 36 }
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index 3c47b7d5d4cf..bec9f79adb25 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -63,7 +63,7 @@ static int sysv_remount(struct super_block *sb, int *flags, char *data)
63 63
64 sync_filesystem(sb); 64 sync_filesystem(sb);
65 if (sbi->s_forced_ro) 65 if (sbi->s_forced_ro)
66 *flags |= MS_RDONLY; 66 *flags |= SB_RDONLY;
67 return 0; 67 return 0;
68} 68}
69 69
diff --git a/fs/sysv/super.c b/fs/sysv/super.c
index 0d56e486b392..89765ddfb738 100644
--- a/fs/sysv/super.c
+++ b/fs/sysv/super.c
@@ -333,7 +333,7 @@ static int complete_read_super(struct super_block *sb, int silent, int size)
333 /* set up enough so that it can read an inode */ 333 /* set up enough so that it can read an inode */
334 sb->s_op = &sysv_sops; 334 sb->s_op = &sysv_sops;
335 if (sbi->s_forced_ro) 335 if (sbi->s_forced_ro)
336 sb->s_flags |= MS_RDONLY; 336 sb->s_flags |= SB_RDONLY;
337 if (sbi->s_truncate) 337 if (sbi->s_truncate)
338 sb->s_d_op = &sysv_dentry_operations; 338 sb->s_d_op = &sysv_dentry_operations;
339 root_inode = sysv_iget(sb, SYSV_ROOT_INO); 339 root_inode = sysv_iget(sb, SYSV_ROOT_INO);
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index a02aa59d1e24..dfe85069586e 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1406,7 +1406,7 @@ int ubifs_update_time(struct inode *inode, struct timespec *time,
1406 if (flags & S_MTIME) 1406 if (flags & S_MTIME)
1407 inode->i_mtime = *time; 1407 inode->i_mtime = *time;
1408 1408
1409 if (!(inode->i_sb->s_flags & MS_LAZYTIME)) 1409 if (!(inode->i_sb->s_flags & SB_LAZYTIME))
1410 iflags |= I_DIRTY_SYNC; 1410 iflags |= I_DIRTY_SYNC;
1411 1411
1412 release = ui->dirty; 1412 release = ui->dirty;
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 3be28900bf37..fe77e9625e84 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -84,7 +84,7 @@ void ubifs_ro_mode(struct ubifs_info *c, int err)
84 if (!c->ro_error) { 84 if (!c->ro_error) {
85 c->ro_error = 1; 85 c->ro_error = 1;
86 c->no_chk_data_crc = 0; 86 c->no_chk_data_crc = 0;
87 c->vfs_sb->s_flags |= MS_RDONLY; 87 c->vfs_sb->s_flags |= SB_RDONLY;
88 ubifs_warn(c, "switched to read-only mode, error %d", err); 88 ubifs_warn(c, "switched to read-only mode, error %d", err);
89 dump_stack(); 89 dump_stack();
90 } 90 }
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 7503e7cdf870..0beb285b143d 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -968,7 +968,7 @@ static int parse_standard_option(const char *option)
968 968
969 pr_notice("UBIFS: parse %s\n", option); 969 pr_notice("UBIFS: parse %s\n", option);
970 if (!strcmp(option, "sync")) 970 if (!strcmp(option, "sync"))
971 return MS_SYNCHRONOUS; 971 return SB_SYNCHRONOUS;
972 return 0; 972 return 0;
973} 973}
974 974
@@ -1160,8 +1160,8 @@ static int mount_ubifs(struct ubifs_info *c)
1160 size_t sz; 1160 size_t sz;
1161 1161
1162 c->ro_mount = !!sb_rdonly(c->vfs_sb); 1162 c->ro_mount = !!sb_rdonly(c->vfs_sb);
1163 /* Suppress error messages while probing if MS_SILENT is set */ 1163 /* Suppress error messages while probing if SB_SILENT is set */
1164 c->probing = !!(c->vfs_sb->s_flags & MS_SILENT); 1164 c->probing = !!(c->vfs_sb->s_flags & SB_SILENT);
1165 1165
1166 err = init_constants_early(c); 1166 err = init_constants_early(c);
1167 if (err) 1167 if (err)
@@ -1852,7 +1852,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
1852 return err; 1852 return err;
1853 } 1853 }
1854 1854
1855 if (c->ro_mount && !(*flags & MS_RDONLY)) { 1855 if (c->ro_mount && !(*flags & SB_RDONLY)) {
1856 if (c->ro_error) { 1856 if (c->ro_error) {
1857 ubifs_msg(c, "cannot re-mount R/W due to prior errors"); 1857 ubifs_msg(c, "cannot re-mount R/W due to prior errors");
1858 return -EROFS; 1858 return -EROFS;
@@ -1864,7 +1864,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
1864 err = ubifs_remount_rw(c); 1864 err = ubifs_remount_rw(c);
1865 if (err) 1865 if (err)
1866 return err; 1866 return err;
1867 } else if (!c->ro_mount && (*flags & MS_RDONLY)) { 1867 } else if (!c->ro_mount && (*flags & SB_RDONLY)) {
1868 if (c->ro_error) { 1868 if (c->ro_error) {
1869 ubifs_msg(c, "cannot re-mount R/O due to prior errors"); 1869 ubifs_msg(c, "cannot re-mount R/O due to prior errors");
1870 return -EROFS; 1870 return -EROFS;
@@ -2117,7 +2117,7 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags,
2117 */ 2117 */
2118 ubi = open_ubi(name, UBI_READONLY); 2118 ubi = open_ubi(name, UBI_READONLY);
2119 if (IS_ERR(ubi)) { 2119 if (IS_ERR(ubi)) {
2120 if (!(flags & MS_SILENT)) 2120 if (!(flags & SB_SILENT))
2121 pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d", 2121 pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
2122 current->pid, name, (int)PTR_ERR(ubi)); 2122 current->pid, name, (int)PTR_ERR(ubi));
2123 return ERR_CAST(ubi); 2123 return ERR_CAST(ubi);
@@ -2143,18 +2143,18 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags,
2143 kfree(c); 2143 kfree(c);
2144 /* A new mount point for already mounted UBIFS */ 2144 /* A new mount point for already mounted UBIFS */
2145 dbg_gen("this ubi volume is already mounted"); 2145 dbg_gen("this ubi volume is already mounted");
2146 if (!!(flags & MS_RDONLY) != c1->ro_mount) { 2146 if (!!(flags & SB_RDONLY) != c1->ro_mount) {
2147 err = -EBUSY; 2147 err = -EBUSY;
2148 goto out_deact; 2148 goto out_deact;
2149 } 2149 }
2150 } else { 2150 } else {
2151 err = ubifs_fill_super(sb, data, flags & MS_SILENT ? 1 : 0); 2151 err = ubifs_fill_super(sb, data, flags & SB_SILENT ? 1 : 0);
2152 if (err) 2152 if (err)
2153 goto out_deact; 2153 goto out_deact;
2154 /* We do not support atime */ 2154 /* We do not support atime */
2155 sb->s_flags |= MS_ACTIVE; 2155 sb->s_flags |= SB_ACTIVE;
2156#ifndef CONFIG_UBIFS_ATIME_SUPPORT 2156#ifndef CONFIG_UBIFS_ATIME_SUPPORT
2157 sb->s_flags |= MS_NOATIME; 2157 sb->s_flags |= SB_NOATIME;
2158#else 2158#else
2159 ubifs_msg(c, "full atime support is enabled."); 2159 ubifs_msg(c, "full atime support is enabled.");
2160#endif 2160#endif
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 63c7468147eb..5ee7af879cc4 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -1201,7 +1201,7 @@ struct ubifs_debug_info;
1201 * @need_recovery: %1 if the file-system needs recovery 1201 * @need_recovery: %1 if the file-system needs recovery
1202 * @replaying: %1 during journal replay 1202 * @replaying: %1 during journal replay
1203 * @mounting: %1 while mounting 1203 * @mounting: %1 while mounting
1204 * @probing: %1 while attempting to mount if MS_SILENT mount flag is set 1204 * @probing: %1 while attempting to mount if SB_SILENT mount flag is set
1205 * @remounting_rw: %1 while re-mounting from R/O mode to R/W mode 1205 * @remounting_rw: %1 while re-mounting from R/O mode to R/W mode
1206 * @replay_list: temporary list used during journal replay 1206 * @replay_list: temporary list used during journal replay
1207 * @replay_buds: list of buds to replay 1207 * @replay_buds: list of buds to replay
@@ -1850,7 +1850,7 @@ __printf(2, 3)
1850void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...); 1850void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...);
1851/* 1851/*
1852 * A conditional variant of 'ubifs_err()' which doesn't output anything 1852 * A conditional variant of 'ubifs_err()' which doesn't output anything
1853 * if probing (ie. MS_SILENT set). 1853 * if probing (ie. SB_SILENT set).
1854 */ 1854 */
1855#define ubifs_errc(c, fmt, ...) \ 1855#define ubifs_errc(c, fmt, ...) \
1856do { \ 1856do { \
diff --git a/fs/udf/super.c b/fs/udf/super.c
index f80e0a0f24d3..f73239a9a97d 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -650,7 +650,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
650 sync_filesystem(sb); 650 sync_filesystem(sb);
651 if (lvidiu) { 651 if (lvidiu) {
652 int write_rev = le16_to_cpu(lvidiu->minUDFWriteRev); 652 int write_rev = le16_to_cpu(lvidiu->minUDFWriteRev);
653 if (write_rev > UDF_MAX_WRITE_VERSION && !(*flags & MS_RDONLY)) 653 if (write_rev > UDF_MAX_WRITE_VERSION && !(*flags & SB_RDONLY))
654 return -EACCES; 654 return -EACCES;
655 } 655 }
656 656
@@ -673,10 +673,10 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
673 sbi->s_dmode = uopt.dmode; 673 sbi->s_dmode = uopt.dmode;
674 write_unlock(&sbi->s_cred_lock); 674 write_unlock(&sbi->s_cred_lock);
675 675
676 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 676 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
677 goto out_unlock; 677 goto out_unlock;
678 678
679 if (*flags & MS_RDONLY) 679 if (*flags & SB_RDONLY)
680 udf_close_lvid(sb); 680 udf_close_lvid(sb);
681 else 681 else
682 udf_open_lvid(sb); 682 udf_open_lvid(sb);
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index b5cd79065ef9..e727ee07dbe4 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -115,7 +115,7 @@ void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count)
115 115
116 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 116 ubh_mark_buffer_dirty (USPI_UBH(uspi));
117 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 117 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
118 if (sb->s_flags & MS_SYNCHRONOUS) 118 if (sb->s_flags & SB_SYNCHRONOUS)
119 ubh_sync_block(UCPI_UBH(ucpi)); 119 ubh_sync_block(UCPI_UBH(ucpi));
120 ufs_mark_sb_dirty(sb); 120 ufs_mark_sb_dirty(sb);
121 121
@@ -205,7 +205,7 @@ do_more:
205 205
206 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 206 ubh_mark_buffer_dirty (USPI_UBH(uspi));
207 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 207 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
208 if (sb->s_flags & MS_SYNCHRONOUS) 208 if (sb->s_flags & SB_SYNCHRONOUS)
209 ubh_sync_block(UCPI_UBH(ucpi)); 209 ubh_sync_block(UCPI_UBH(ucpi));
210 210
211 if (overflow) { 211 if (overflow) {
@@ -567,7 +567,7 @@ static u64 ufs_add_fragments(struct inode *inode, u64 fragment,
567 567
568 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 568 ubh_mark_buffer_dirty (USPI_UBH(uspi));
569 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 569 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
570 if (sb->s_flags & MS_SYNCHRONOUS) 570 if (sb->s_flags & SB_SYNCHRONOUS)
571 ubh_sync_block(UCPI_UBH(ucpi)); 571 ubh_sync_block(UCPI_UBH(ucpi));
572 ufs_mark_sb_dirty(sb); 572 ufs_mark_sb_dirty(sb);
573 573
@@ -688,7 +688,7 @@ cg_found:
688succed: 688succed:
689 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 689 ubh_mark_buffer_dirty (USPI_UBH(uspi));
690 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 690 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
691 if (sb->s_flags & MS_SYNCHRONOUS) 691 if (sb->s_flags & SB_SYNCHRONOUS)
692 ubh_sync_block(UCPI_UBH(ucpi)); 692 ubh_sync_block(UCPI_UBH(ucpi));
693 ufs_mark_sb_dirty(sb); 693 ufs_mark_sb_dirty(sb);
694 694
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c
index 916b4a428933..e1ef0f0a1353 100644
--- a/fs/ufs/ialloc.c
+++ b/fs/ufs/ialloc.c
@@ -112,7 +112,7 @@ void ufs_free_inode (struct inode * inode)
112 112
113 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 113 ubh_mark_buffer_dirty (USPI_UBH(uspi));
114 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 114 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
115 if (sb->s_flags & MS_SYNCHRONOUS) 115 if (sb->s_flags & SB_SYNCHRONOUS)
116 ubh_sync_block(UCPI_UBH(ucpi)); 116 ubh_sync_block(UCPI_UBH(ucpi));
117 117
118 ufs_mark_sb_dirty(sb); 118 ufs_mark_sb_dirty(sb);
@@ -146,14 +146,14 @@ static void ufs2_init_inodes_chunk(struct super_block *sb,
146 set_buffer_uptodate(bh); 146 set_buffer_uptodate(bh);
147 mark_buffer_dirty(bh); 147 mark_buffer_dirty(bh);
148 unlock_buffer(bh); 148 unlock_buffer(bh);
149 if (sb->s_flags & MS_SYNCHRONOUS) 149 if (sb->s_flags & SB_SYNCHRONOUS)
150 sync_dirty_buffer(bh); 150 sync_dirty_buffer(bh);
151 brelse(bh); 151 brelse(bh);
152 } 152 }
153 153
154 fs32_add(sb, &ucg->cg_u.cg_u2.cg_initediblk, uspi->s_inopb); 154 fs32_add(sb, &ucg->cg_u.cg_u2.cg_initediblk, uspi->s_inopb);
155 ubh_mark_buffer_dirty(UCPI_UBH(ucpi)); 155 ubh_mark_buffer_dirty(UCPI_UBH(ucpi));
156 if (sb->s_flags & MS_SYNCHRONOUS) 156 if (sb->s_flags & SB_SYNCHRONOUS)
157 ubh_sync_block(UCPI_UBH(ucpi)); 157 ubh_sync_block(UCPI_UBH(ucpi));
158 158
159 UFSD("EXIT\n"); 159 UFSD("EXIT\n");
@@ -284,7 +284,7 @@ cg_found:
284 } 284 }
285 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 285 ubh_mark_buffer_dirty (USPI_UBH(uspi));
286 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 286 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
287 if (sb->s_flags & MS_SYNCHRONOUS) 287 if (sb->s_flags & SB_SYNCHRONOUS)
288 ubh_sync_block(UCPI_UBH(ucpi)); 288 ubh_sync_block(UCPI_UBH(ucpi));
289 ufs_mark_sb_dirty(sb); 289 ufs_mark_sb_dirty(sb);
290 290
@@ -330,7 +330,7 @@ cg_found:
330 ufs2_inode->ui_birthnsec = cpu_to_fs32(sb, ts.tv_nsec); 330 ufs2_inode->ui_birthnsec = cpu_to_fs32(sb, ts.tv_nsec);
331 mark_buffer_dirty(bh); 331 mark_buffer_dirty(bh);
332 unlock_buffer(bh); 332 unlock_buffer(bh);
333 if (sb->s_flags & MS_SYNCHRONOUS) 333 if (sb->s_flags & SB_SYNCHRONOUS)
334 sync_dirty_buffer(bh); 334 sync_dirty_buffer(bh);
335 brelse(bh); 335 brelse(bh);
336 } 336 }
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 6440003f8ddc..4d497e9c6883 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -282,7 +282,7 @@ void ufs_error (struct super_block * sb, const char * function,
282 usb1->fs_clean = UFS_FSBAD; 282 usb1->fs_clean = UFS_FSBAD;
283 ubh_mark_buffer_dirty(USPI_UBH(uspi)); 283 ubh_mark_buffer_dirty(USPI_UBH(uspi));
284 ufs_mark_sb_dirty(sb); 284 ufs_mark_sb_dirty(sb);
285 sb->s_flags |= MS_RDONLY; 285 sb->s_flags |= SB_RDONLY;
286 } 286 }
287 va_start(args, fmt); 287 va_start(args, fmt);
288 vaf.fmt = fmt; 288 vaf.fmt = fmt;
@@ -320,7 +320,7 @@ void ufs_panic (struct super_block * sb, const char * function,
320 va_start(args, fmt); 320 va_start(args, fmt);
321 vaf.fmt = fmt; 321 vaf.fmt = fmt;
322 vaf.va = &args; 322 vaf.va = &args;
323 sb->s_flags |= MS_RDONLY; 323 sb->s_flags |= SB_RDONLY;
324 pr_crit("panic (device %s): %s: %pV\n", 324 pr_crit("panic (device %s): %s: %pV\n",
325 sb->s_id, function, &vaf); 325 sb->s_id, function, &vaf);
326 va_end(args); 326 va_end(args);
@@ -905,7 +905,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
905 if (!sb_rdonly(sb)) { 905 if (!sb_rdonly(sb)) {
906 if (!silent) 906 if (!silent)
907 pr_info("ufstype=old is supported read-only\n"); 907 pr_info("ufstype=old is supported read-only\n");
908 sb->s_flags |= MS_RDONLY; 908 sb->s_flags |= SB_RDONLY;
909 } 909 }
910 break; 910 break;
911 911
@@ -921,7 +921,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
921 if (!sb_rdonly(sb)) { 921 if (!sb_rdonly(sb)) {
922 if (!silent) 922 if (!silent)
923 pr_info("ufstype=nextstep is supported read-only\n"); 923 pr_info("ufstype=nextstep is supported read-only\n");
924 sb->s_flags |= MS_RDONLY; 924 sb->s_flags |= SB_RDONLY;
925 } 925 }
926 break; 926 break;
927 927
@@ -937,7 +937,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
937 if (!sb_rdonly(sb)) { 937 if (!sb_rdonly(sb)) {
938 if (!silent) 938 if (!silent)
939 pr_info("ufstype=nextstep-cd is supported read-only\n"); 939 pr_info("ufstype=nextstep-cd is supported read-only\n");
940 sb->s_flags |= MS_RDONLY; 940 sb->s_flags |= SB_RDONLY;
941 } 941 }
942 break; 942 break;
943 943
@@ -953,7 +953,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
953 if (!sb_rdonly(sb)) { 953 if (!sb_rdonly(sb)) {
954 if (!silent) 954 if (!silent)
955 pr_info("ufstype=openstep is supported read-only\n"); 955 pr_info("ufstype=openstep is supported read-only\n");
956 sb->s_flags |= MS_RDONLY; 956 sb->s_flags |= SB_RDONLY;
957 } 957 }
958 break; 958 break;
959 959
@@ -968,7 +968,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
968 if (!sb_rdonly(sb)) { 968 if (!sb_rdonly(sb)) {
969 if (!silent) 969 if (!silent)
970 pr_info("ufstype=hp is supported read-only\n"); 970 pr_info("ufstype=hp is supported read-only\n");
971 sb->s_flags |= MS_RDONLY; 971 sb->s_flags |= SB_RDONLY;
972 } 972 }
973 break; 973 break;
974 default: 974 default:
@@ -1125,21 +1125,21 @@ magic_found:
1125 break; 1125 break;
1126 case UFS_FSACTIVE: 1126 case UFS_FSACTIVE:
1127 pr_err("%s(): fs is active\n", __func__); 1127 pr_err("%s(): fs is active\n", __func__);
1128 sb->s_flags |= MS_RDONLY; 1128 sb->s_flags |= SB_RDONLY;
1129 break; 1129 break;
1130 case UFS_FSBAD: 1130 case UFS_FSBAD:
1131 pr_err("%s(): fs is bad\n", __func__); 1131 pr_err("%s(): fs is bad\n", __func__);
1132 sb->s_flags |= MS_RDONLY; 1132 sb->s_flags |= SB_RDONLY;
1133 break; 1133 break;
1134 default: 1134 default:
1135 pr_err("%s(): can't grok fs_clean 0x%x\n", 1135 pr_err("%s(): can't grok fs_clean 0x%x\n",
1136 __func__, usb1->fs_clean); 1136 __func__, usb1->fs_clean);
1137 sb->s_flags |= MS_RDONLY; 1137 sb->s_flags |= SB_RDONLY;
1138 break; 1138 break;
1139 } 1139 }
1140 } else { 1140 } else {
1141 pr_err("%s(): fs needs fsck\n", __func__); 1141 pr_err("%s(): fs needs fsck\n", __func__);
1142 sb->s_flags |= MS_RDONLY; 1142 sb->s_flags |= SB_RDONLY;
1143 } 1143 }
1144 1144
1145 /* 1145 /*
@@ -1328,7 +1328,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1328 return -EINVAL; 1328 return -EINVAL;
1329 } 1329 }
1330 1330
1331 if ((bool)(*mount_flags & MS_RDONLY) == sb_rdonly(sb)) { 1331 if ((bool)(*mount_flags & SB_RDONLY) == sb_rdonly(sb)) {
1332 UFS_SB(sb)->s_mount_opt = new_mount_opt; 1332 UFS_SB(sb)->s_mount_opt = new_mount_opt;
1333 mutex_unlock(&UFS_SB(sb)->s_lock); 1333 mutex_unlock(&UFS_SB(sb)->s_lock);
1334 return 0; 1334 return 0;
@@ -1337,7 +1337,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1337 /* 1337 /*
1338 * fs was mouted as rw, remounting ro 1338 * fs was mouted as rw, remounting ro
1339 */ 1339 */
1340 if (*mount_flags & MS_RDONLY) { 1340 if (*mount_flags & SB_RDONLY) {
1341 ufs_put_super_internal(sb); 1341 ufs_put_super_internal(sb);
1342 usb1->fs_time = cpu_to_fs32(sb, get_seconds()); 1342 usb1->fs_time = cpu_to_fs32(sb, get_seconds());
1343 if ((flags & UFS_ST_MASK) == UFS_ST_SUN 1343 if ((flags & UFS_ST_MASK) == UFS_ST_SUN
@@ -1346,7 +1346,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1346 ufs_set_fs_state(sb, usb1, usb3, 1346 ufs_set_fs_state(sb, usb1, usb3,
1347 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); 1347 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time));
1348 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 1348 ubh_mark_buffer_dirty (USPI_UBH(uspi));
1349 sb->s_flags |= MS_RDONLY; 1349 sb->s_flags |= SB_RDONLY;
1350 } else { 1350 } else {
1351 /* 1351 /*
1352 * fs was mounted as ro, remounting rw 1352 * fs was mounted as ro, remounting rw
@@ -1370,7 +1370,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1370 mutex_unlock(&UFS_SB(sb)->s_lock); 1370 mutex_unlock(&UFS_SB(sb)->s_lock);
1371 return -EPERM; 1371 return -EPERM;
1372 } 1372 }
1373 sb->s_flags &= ~MS_RDONLY; 1373 sb->s_flags &= ~SB_RDONLY;
1374#endif 1374#endif
1375 } 1375 }
1376 UFS_SB(sb)->s_mount_opt = new_mount_opt; 1376 UFS_SB(sb)->s_mount_opt = new_mount_opt;
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 38d4227895ae..a503af96d780 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -781,17 +781,17 @@ xfs_log_mount_finish(
781 * something to an unlinked inode, the irele won't cause 781 * something to an unlinked inode, the irele won't cause
782 * premature truncation and freeing of the inode, which results 782 * premature truncation and freeing of the inode, which results
783 * in log recovery failure. We have to evict the unreferenced 783 * in log recovery failure. We have to evict the unreferenced
784 * lru inodes after clearing MS_ACTIVE because we don't 784 * lru inodes after clearing SB_ACTIVE because we don't
785 * otherwise clean up the lru if there's a subsequent failure in 785 * otherwise clean up the lru if there's a subsequent failure in
786 * xfs_mountfs, which leads to us leaking the inodes if nothing 786 * xfs_mountfs, which leads to us leaking the inodes if nothing
787 * else (e.g. quotacheck) references the inodes before the 787 * else (e.g. quotacheck) references the inodes before the
788 * mount failure occurs. 788 * mount failure occurs.
789 */ 789 */
790 mp->m_super->s_flags |= MS_ACTIVE; 790 mp->m_super->s_flags |= SB_ACTIVE;
791 error = xlog_recover_finish(mp->m_log); 791 error = xlog_recover_finish(mp->m_log);
792 if (!error) 792 if (!error)
793 xfs_log_work_queue(mp); 793 xfs_log_work_queue(mp);
794 mp->m_super->s_flags &= ~MS_ACTIVE; 794 mp->m_super->s_flags &= ~SB_ACTIVE;
795 evict_inodes(mp->m_super); 795 evict_inodes(mp->m_super);
796 796
797 /* 797 /*
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index f663022353c0..5122d3021117 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -212,9 +212,9 @@ xfs_parseargs(
212 */ 212 */
213 if (sb_rdonly(sb)) 213 if (sb_rdonly(sb))
214 mp->m_flags |= XFS_MOUNT_RDONLY; 214 mp->m_flags |= XFS_MOUNT_RDONLY;
215 if (sb->s_flags & MS_DIRSYNC) 215 if (sb->s_flags & SB_DIRSYNC)
216 mp->m_flags |= XFS_MOUNT_DIRSYNC; 216 mp->m_flags |= XFS_MOUNT_DIRSYNC;
217 if (sb->s_flags & MS_SYNCHRONOUS) 217 if (sb->s_flags & SB_SYNCHRONOUS)
218 mp->m_flags |= XFS_MOUNT_WSYNC; 218 mp->m_flags |= XFS_MOUNT_WSYNC;
219 219
220 /* 220 /*
@@ -1312,7 +1312,7 @@ xfs_fs_remount(
1312 } 1312 }
1313 1313
1314 /* ro -> rw */ 1314 /* ro -> rw */
1315 if ((mp->m_flags & XFS_MOUNT_RDONLY) && !(*flags & MS_RDONLY)) { 1315 if ((mp->m_flags & XFS_MOUNT_RDONLY) && !(*flags & SB_RDONLY)) {
1316 if (mp->m_flags & XFS_MOUNT_NORECOVERY) { 1316 if (mp->m_flags & XFS_MOUNT_NORECOVERY) {
1317 xfs_warn(mp, 1317 xfs_warn(mp,
1318 "ro->rw transition prohibited on norecovery mount"); 1318 "ro->rw transition prohibited on norecovery mount");
@@ -1368,7 +1368,7 @@ xfs_fs_remount(
1368 } 1368 }
1369 1369
1370 /* rw -> ro */ 1370 /* rw -> ro */
1371 if (!(mp->m_flags & XFS_MOUNT_RDONLY) && (*flags & MS_RDONLY)) { 1371 if (!(mp->m_flags & XFS_MOUNT_RDONLY) && (*flags & SB_RDONLY)) {
1372 /* Free the per-AG metadata reservation pool. */ 1372 /* Free the per-AG metadata reservation pool. */
1373 error = xfs_fs_unreserve_ag_blocks(mp); 1373 error = xfs_fs_unreserve_ag_blocks(mp);
1374 if (error) { 1374 if (error) {
diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
index 5f2f32408011..fcc5dfc70aa0 100644
--- a/fs/xfs/xfs_super.h
+++ b/fs/xfs/xfs_super.h
@@ -30,7 +30,7 @@ extern void xfs_qm_exit(void);
30 30
31#ifdef CONFIG_XFS_POSIX_ACL 31#ifdef CONFIG_XFS_POSIX_ACL
32# define XFS_ACL_STRING "ACLs, " 32# define XFS_ACL_STRING "ACLs, "
33# define set_posix_acl_flag(sb) ((sb)->s_flags |= MS_POSIXACL) 33# define set_posix_acl_flag(sb) ((sb)->s_flags |= SB_POSIXACL)
34#else 34#else
35# define XFS_ACL_STRING 35# define XFS_ACL_STRING
36# define set_posix_acl_flag(sb) do { } while (0) 36# define set_posix_acl_flag(sb) do { } while (0)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2995a271ec46..bbd92da0946e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1872,7 +1872,7 @@ struct super_operations {
1872 */ 1872 */
1873#define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg)) 1873#define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg))
1874 1874
1875static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & MS_RDONLY; } 1875static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & SB_RDONLY; }
1876#define IS_RDONLY(inode) sb_rdonly((inode)->i_sb) 1876#define IS_RDONLY(inode) sb_rdonly((inode)->i_sb)
1877#define IS_SYNC(inode) (__IS_FLG(inode, SB_SYNCHRONOUS) || \ 1877#define IS_SYNC(inode) (__IS_FLG(inode, SB_SYNCHRONOUS) || \
1878 ((inode)->i_flags & S_SYNC)) 1878 ((inode)->i_flags & S_SYNC))
diff --git a/include/uapi/linux/bfs_fs.h b/include/uapi/linux/bfs_fs.h
index 73445ef07dda..940b04772af8 100644
--- a/include/uapi/linux/bfs_fs.h
+++ b/include/uapi/linux/bfs_fs.h
@@ -76,7 +76,7 @@ struct bfs_super_block {
76#define BFS_FILEBLOCKS(ip) \ 76#define BFS_FILEBLOCKS(ip) \
77 ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock)) 77 ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock))
78#define BFS_UNCLEAN(bfs_sb, sb) \ 78#define BFS_UNCLEAN(bfs_sb, sb) \
79 ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) 79 ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & SB_RDONLY))
80 80
81 81
82#endif /* _LINUX_BFS_FS_H */ 82#endif /* _LINUX_BFS_FS_H */
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index d24025626310..9649ecd8a73a 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -331,7 +331,7 @@ static struct dentry *mqueue_mount(struct file_system_type *fs_type,
331 void *data) 331 void *data)
332{ 332{
333 struct ipc_namespace *ns; 333 struct ipc_namespace *ns;
334 if (flags & MS_KERNMOUNT) { 334 if (flags & SB_KERNMOUNT) {
335 ns = data; 335 ns = data;
336 data = NULL; 336 data = NULL;
337 } else { 337 } else {
diff --git a/mm/shmem.c b/mm/shmem.c
index 4aa9307feab0..7fbe67be86fa 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3776,7 +3776,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
3776 * tmpfs instance, limiting inodes to one per page of lowmem; 3776 * tmpfs instance, limiting inodes to one per page of lowmem;
3777 * but the internal instance is left unlimited. 3777 * but the internal instance is left unlimited.
3778 */ 3778 */
3779 if (!(sb->s_flags & MS_KERNMOUNT)) { 3779 if (!(sb->s_flags & SB_KERNMOUNT)) {
3780 sbinfo->max_blocks = shmem_default_max_blocks(); 3780 sbinfo->max_blocks = shmem_default_max_blocks();
3781 sbinfo->max_inodes = shmem_default_max_inodes(); 3781 sbinfo->max_inodes = shmem_default_max_inodes();
3782 if (shmem_parse_options(data, sbinfo, false)) { 3782 if (shmem_parse_options(data, sbinfo, false)) {
@@ -3784,12 +3784,12 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
3784 goto failed; 3784 goto failed;
3785 } 3785 }
3786 } else { 3786 } else {
3787 sb->s_flags |= MS_NOUSER; 3787 sb->s_flags |= SB_NOUSER;
3788 } 3788 }
3789 sb->s_export_op = &shmem_export_ops; 3789 sb->s_export_op = &shmem_export_ops;
3790 sb->s_flags |= MS_NOSEC; 3790 sb->s_flags |= SB_NOSEC;
3791#else 3791#else
3792 sb->s_flags |= MS_NOUSER; 3792 sb->s_flags |= SB_NOUSER;
3793#endif 3793#endif
3794 3794
3795 spin_lock_init(&sbinfo->stat_lock); 3795 spin_lock_init(&sbinfo->stat_lock);
@@ -3809,7 +3809,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
3809 sb->s_xattr = shmem_xattr_handlers; 3809 sb->s_xattr = shmem_xattr_handlers;
3810#endif 3810#endif
3811#ifdef CONFIG_TMPFS_POSIX_ACL 3811#ifdef CONFIG_TMPFS_POSIX_ACL
3812 sb->s_flags |= MS_POSIXACL; 3812 sb->s_flags |= SB_POSIXACL;
3813#endif 3813#endif
3814 uuid_gen(&sb->s_uuid); 3814 uuid_gen(&sb->s_uuid);
3815 3815
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 8542e9a55e1b..d4fa04d91439 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -2451,7 +2451,7 @@ static int __init aa_create_aafs(void)
2451 aafs_mnt = kern_mount(&aafs_ops); 2451 aafs_mnt = kern_mount(&aafs_ops);
2452 if (IS_ERR(aafs_mnt)) 2452 if (IS_ERR(aafs_mnt))
2453 panic("can't set apparmorfs up\n"); 2453 panic("can't set apparmorfs up\n");
2454 aafs_mnt->mnt_sb->s_flags &= ~MS_NOUSER; 2454 aafs_mnt->mnt_sb->s_flags &= ~SB_NOUSER;
2455 2455
2456 /* Populate fs tree. */ 2456 /* Populate fs tree. */
2457 error = entry_create_dir(&aa_sfs_entry, NULL); 2457 error = entry_create_dir(&aa_sfs_entry, NULL);
diff --git a/security/apparmor/include/lib.h b/security/apparmor/include/lib.h
index f546707a2bbb..6505e1ad9e23 100644
--- a/security/apparmor/include/lib.h
+++ b/security/apparmor/include/lib.h
@@ -86,7 +86,7 @@ static inline unsigned int aa_dfa_null_transition(struct aa_dfa *dfa,
86 86
87static inline bool path_mediated_fs(struct dentry *dentry) 87static inline bool path_mediated_fs(struct dentry *dentry)
88{ 88{
89 return !(dentry->d_sb->s_flags & MS_NOUSER); 89 return !(dentry->d_sb->s_flags & SB_NOUSER);
90} 90}
91 91
92 92