Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+417 -417
+3 -3
drivers/mtd/mtdsuper.c
··· 79 79 pr_debug("MTDSB: New superblock for device %d (\"%s\")\n", 80 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 83 if (ret < 0) { 84 84 deactivate_locked_super(sb); 85 85 return ERR_PTR(ret); 86 86 } 87 87 88 88 /* go */ 89 - sb->s_flags |= MS_ACTIVE; 89 + sb->s_flags |= SB_ACTIVE; 90 90 return dget(sb->s_root); 91 91 92 92 /* new mountpoint for an already mounted superblock */ ··· 202 202 not_an_MTD_device: 203 203 #endif /* CONFIG_BLOCK */ 204 204 205 - if (!(flags & MS_SILENT)) 205 + if (!(flags & SB_SILENT)) 206 206 printk(KERN_NOTICE 207 207 "MTD: Attempt to mount non-MTD device \"%s\"\n", 208 208 dev_name);
+1 -1
drivers/staging/lustre/lustre/llite/file.c
··· 1016 1016 if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)) 1017 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 1020 return true; 1021 1021 1022 1022 return false;
+7 -7
drivers/staging/lustre/lustre/llite/llite_lib.c
··· 313 313 } 314 314 315 315 if (data->ocd_connect_flags & OBD_CONNECT_ACL) { 316 - sb->s_flags |= MS_POSIXACL; 316 + sb->s_flags |= SB_POSIXACL; 317 317 sbi->ll_flags |= LL_SBI_ACL; 318 318 } else { 319 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 321 sbi->ll_flags &= ~LL_SBI_ACL; 322 322 } 323 323 ··· 660 660 struct ll_sb_info *sbi; 661 661 662 662 /* not init sb ?*/ 663 - if (!(sb->s_flags & MS_ACTIVE)) 663 + if (!(sb->s_flags & SB_ACTIVE)) 664 664 return; 665 665 666 666 sbi = ll_s2sbi(sb); ··· 2039 2039 int err; 2040 2040 __u32 read_only; 2041 2041 2042 - if ((bool)(*flags & MS_RDONLY) != sb_rdonly(sb)) { 2043 - read_only = *flags & MS_RDONLY; 2042 + if ((bool)(*flags & SB_RDONLY) != sb_rdonly(sb)) { 2043 + read_only = *flags & SB_RDONLY; 2044 2044 err = obd_set_info_async(NULL, sbi->ll_md_exp, 2045 2045 sizeof(KEY_READ_ONLY), 2046 2046 KEY_READ_ONLY, sizeof(read_only), ··· 2053 2053 } 2054 2054 2055 2055 if (read_only) 2056 - sb->s_flags |= MS_RDONLY; 2056 + sb->s_flags |= SB_RDONLY; 2057 2057 else 2058 - sb->s_flags &= ~MS_RDONLY; 2058 + sb->s_flags &= ~SB_RDONLY; 2059 2059 2060 2060 if (sbi->ll_flags & LL_SBI_VERBOSE) 2061 2061 LCONSOLE_WARN("Remounted %s %s\n", profilenm,
+3 -3
fs/9p/vfs_super.c
··· 94 94 if (v9ses->cache) 95 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 98 if (!v9ses->cache) 99 - sb->s_flags |= MS_SYNCHRONOUS; 99 + sb->s_flags |= SB_SYNCHRONOUS; 100 100 101 101 #ifdef CONFIG_9P_FS_POSIX_ACL 102 102 if ((v9ses->flags & V9FS_ACL_MASK) == V9FS_POSIX_ACL) 103 - sb->s_flags |= MS_POSIXACL; 103 + sb->s_flags |= SB_POSIXACL; 104 104 #endif 105 105 106 106 return 0;
+2 -2
fs/adfs/super.c
··· 213 213 static int adfs_remount(struct super_block *sb, int *flags, char *data) 214 214 { 215 215 sync_filesystem(sb); 216 - *flags |= MS_NODIRATIME; 216 + *flags |= SB_NODIRATIME; 217 217 return parse_options(sb, data); 218 218 } 219 219 ··· 372 372 struct inode *root; 373 373 int ret = -EINVAL; 374 374 375 - sb->s_flags |= MS_NODIRATIME; 375 + sb->s_flags |= SB_NODIRATIME; 376 376 377 377 asb = kzalloc(sizeof(*asb), GFP_KERNEL); 378 378 if (!asb)
+1 -1
fs/affs/amigaffs.c
··· 453 453 pr_crit("error (device %s): %s(): %pV\n", sb->s_id, function, &vaf); 454 454 if (!sb_rdonly(sb)) 455 455 pr_warn("Remounting filesystem read-only\n"); 456 - sb->s_flags |= MS_RDONLY; 456 + sb->s_flags |= SB_RDONLY; 457 457 va_end(args); 458 458 } 459 459
+3 -3
fs/affs/bitmap.c
··· 250 250 int i, res = 0; 251 251 struct affs_sb_info *sbi = AFFS_SB(sb); 252 252 253 - if (*flags & MS_RDONLY) 253 + if (*flags & SB_RDONLY) 254 254 return 0; 255 255 256 256 if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) { 257 257 pr_notice("Bitmap invalid - mounting %s read only\n", sb->s_id); 258 - *flags |= MS_RDONLY; 258 + *flags |= SB_RDONLY; 259 259 return 0; 260 260 } 261 261 ··· 288 288 if (affs_checksum_block(sb, bh)) { 289 289 pr_warn("Bitmap %u invalid - mounting %s read only.\n", 290 290 bm->bm_key, sb->s_id); 291 - *flags |= MS_RDONLY; 291 + *flags |= SB_RDONLY; 292 292 goto out; 293 293 } 294 294 pr_debug("read bitmap block %d: %d\n", blk, bm->bm_key);
+8 -8
fs/affs/super.c
··· 356 356 357 357 sb->s_magic = AFFS_SUPER_MAGIC; 358 358 sb->s_op = &affs_sops; 359 - sb->s_flags |= MS_NODIRATIME; 359 + sb->s_flags |= SB_NODIRATIME; 360 360 361 361 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); 362 362 if (!sbi) ··· 466 466 if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS 467 467 || chksum == MUFS_DCOFS) && !sb_rdonly(sb)) { 468 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 471 switch (chksum) { 472 472 case MUFS_FS: ··· 488 488 /* fall thru */ 489 489 case FS_OFS: 490 490 affs_set_opt(sbi->s_flags, SF_OFS); 491 - sb->s_flags |= MS_NOEXEC; 491 + sb->s_flags |= SB_NOEXEC; 492 492 break; 493 493 case MUFS_DCOFS: 494 494 case MUFS_INTLOFS: ··· 497 497 case FS_INTLOFS: 498 498 affs_set_opt(sbi->s_flags, SF_INTL); 499 499 affs_set_opt(sbi->s_flags, SF_OFS); 500 - sb->s_flags |= MS_NOEXEC; 500 + sb->s_flags |= SB_NOEXEC; 501 501 break; 502 502 default: 503 503 pr_err("Unknown filesystem on device %s: %08X\n", ··· 513 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 518 sbi->s_data_blksize = sb->s_blocksize; 519 519 if (affs_test_opt(sbi->s_flags, SF_OFS)) ··· 570 570 pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data); 571 571 572 572 sync_filesystem(sb); 573 - *flags |= MS_NODIRATIME; 573 + *flags |= SB_NODIRATIME; 574 574 575 575 memcpy(volume, sbi->s_volume, 32); 576 576 if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block, ··· 596 596 memcpy(sbi->s_volume, volume, 32); 597 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 600 return 0; 601 601 602 - if (*flags & MS_RDONLY) 602 + if (*flags & SB_RDONLY) 603 603 affs_free_bitmap(sb); 604 604 else 605 605 res = affs_init_bitmap(sb, flags);
+2 -2
fs/afs/super.c
··· 496 496 if (ret < 0) 497 497 goto error_sb; 498 498 as = NULL; 499 - sb->s_flags |= MS_ACTIVE; 499 + sb->s_flags |= SB_ACTIVE; 500 500 } else { 501 501 _debug("reuse"); 502 - ASSERTCMP(sb->s_flags, &, MS_ACTIVE); 502 + ASSERTCMP(sb->s_flags, &, SB_ACTIVE); 503 503 afs_destroy_sbi(as); 504 504 as = NULL; 505 505 }
+1 -1
fs/befs/ChangeLog
··· 365 365 (fs/befs/super.c) 366 366 367 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 369 Not that it was possible to write before. But now the kernel won't even try. 370 370 (fs/befs/super.c) 371 371
+2 -2
fs/befs/linuxvfs.c
··· 841 841 if (!sb_rdonly(sb)) { 842 842 befs_warning(sb, 843 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 948 befs_remount(struct super_block *sb, int *flags, char *data) 949 949 { 950 950 sync_filesystem(sb); 951 - if (!(*flags & MS_RDONLY)) 951 + if (!(*flags & SB_RDONLY)) 952 952 return -EINVAL; 953 953 return 0; 954 954 }
+1 -1
fs/btrfs/ctree.h
··· 2957 2957 */ 2958 2958 static 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 2963 2963 static inline void free_fs_info(struct btrfs_fs_info *fs_info)
+1 -1
fs/btrfs/extent_io.c
··· 1984 1984 struct btrfs_bio *bbio = NULL; 1985 1985 int ret; 1986 1986 1987 - ASSERT(!(fs_info->sb->s_flags & MS_RDONLY)); 1987 + ASSERT(!(fs_info->sb->s_flags & SB_RDONLY)); 1988 1988 BUG_ON(!mirror_num); 1989 1989 1990 1990 bio = btrfs_io_bio_alloc(1);
+2 -2
fs/btrfs/ioctl.c
··· 1172 1172 if (!i_done || ret) 1173 1173 goto out; 1174 1174 1175 - if (!(inode->i_sb->s_flags & MS_ACTIVE)) 1175 + if (!(inode->i_sb->s_flags & SB_ACTIVE)) 1176 1176 goto out; 1177 1177 1178 1178 /* ··· 1333 1333 * make sure we stop running if someone unmounts 1334 1334 * the FS 1335 1335 */ 1336 - if (!(inode->i_sb->s_flags & MS_ACTIVE)) 1336 + if (!(inode->i_sb->s_flags & SB_ACTIVE)) 1337 1337 break; 1338 1338 1339 1339 if (btrfs_defrag_cancelled(fs_info)) {
+25 -25
fs/btrfs/super.c
··· 107 107 return; 108 108 109 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 111 btrfs_info(fs_info, "forced readonly"); 112 112 /* 113 113 * Note that a running device replace operation is not ··· 137 137 138 138 /* 139 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 142 if (errno == -EROFS && sb_rdonly(sb)) 143 143 return; ··· 168 168 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state); 169 169 170 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 172 btrfs_handle_error(fs_info); 173 173 } 174 174 ··· 625 625 break; 626 626 case Opt_acl: 627 627 #ifdef CONFIG_BTRFS_FS_POSIX_ACL 628 - info->sb->s_flags |= MS_POSIXACL; 628 + info->sb->s_flags |= SB_POSIXACL; 629 629 break; 630 630 #else 631 631 btrfs_err(info, "support for ACL not compiled in!"); ··· 633 633 goto out; 634 634 #endif 635 635 case Opt_noacl: 636 - info->sb->s_flags &= ~MS_POSIXACL; 636 + info->sb->s_flags &= ~SB_POSIXACL; 637 637 break; 638 638 case Opt_notreelog: 639 639 btrfs_set_and_info(info, NOTREELOG, ··· 851 851 /* 852 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 855 btrfs_err(info, 856 856 "nologreplay must be used with ro mount option"); 857 857 ret = -EINVAL; ··· 1147 1147 sb->s_xattr = btrfs_xattr_handlers; 1148 1148 sb->s_time_gran = 1; 1149 1149 #ifdef CONFIG_BTRFS_FS_POSIX_ACL 1150 - sb->s_flags |= MS_POSIXACL; 1150 + sb->s_flags |= SB_POSIXACL; 1151 1151 #endif 1152 1152 sb->s_flags |= SB_I_VERSION; 1153 1153 sb->s_iflags |= SB_I_CGROUPWB; ··· 1180 1180 } 1181 1181 1182 1182 cleancache_init_fs(sb); 1183 - sb->s_flags |= MS_ACTIVE; 1183 + sb->s_flags |= SB_ACTIVE; 1184 1184 return 0; 1185 1185 1186 1186 fail_close: ··· 1277 1277 seq_puts(seq, ",flushoncommit"); 1278 1278 if (btrfs_test_opt(info, DISCARD)) 1279 1279 seq_puts(seq, ",discard"); 1280 - if (!(info->sb->s_flags & MS_POSIXACL)) 1280 + if (!(info->sb->s_flags & SB_POSIXACL)) 1281 1281 seq_puts(seq, ",noacl"); 1282 1282 if (btrfs_test_opt(info, SPACE_CACHE)) 1283 1283 seq_puts(seq, ",space_cache"); ··· 1409 1409 1410 1410 mnt = vfs_kern_mount(&btrfs_fs_type, flags, device_name, newargs); 1411 1411 if (PTR_ERR_OR_ZERO(mnt) == -EBUSY) { 1412 - if (flags & MS_RDONLY) { 1413 - mnt = vfs_kern_mount(&btrfs_fs_type, flags & ~MS_RDONLY, 1412 + if (flags & SB_RDONLY) { 1413 + mnt = vfs_kern_mount(&btrfs_fs_type, flags & ~SB_RDONLY, 1414 1414 device_name, newargs); 1415 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 1417 device_name, newargs); 1418 1418 if (IS_ERR(mnt)) { 1419 1419 root = ERR_CAST(mnt); ··· 1565 1565 u64 subvol_objectid = 0; 1566 1566 int error = 0; 1567 1567 1568 - if (!(flags & MS_RDONLY)) 1568 + if (!(flags & SB_RDONLY)) 1569 1569 mode |= FMODE_WRITE; 1570 1570 1571 1571 error = btrfs_parse_early_options(data, mode, fs_type, ··· 1619 1619 if (error) 1620 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 1623 error = -EACCES; 1624 1624 goto error_close_devices; 1625 1625 } 1626 1626 1627 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 1629 fs_info); 1630 1630 if (IS_ERR(s)) { 1631 1631 error = PTR_ERR(s); ··· 1635 1635 if (s->s_root) { 1636 1636 btrfs_close_devices(fs_devices); 1637 1637 free_fs_info(fs_info); 1638 - if ((flags ^ s->s_flags) & MS_RDONLY) 1638 + if ((flags ^ s->s_flags) & SB_RDONLY) 1639 1639 error = -EBUSY; 1640 1640 } else { 1641 1641 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev); ··· 1702 1702 { 1703 1703 if (btrfs_raw_test_opt(old_opts, AUTO_DEFRAG) && 1704 1704 (!btrfs_raw_test_opt(fs_info->mount_opt, AUTO_DEFRAG) || 1705 - (flags & MS_RDONLY))) { 1705 + (flags & SB_RDONLY))) { 1706 1706 /* wait for any defraggers to finish */ 1707 1707 wait_event(fs_info->transaction_wait, 1708 1708 (atomic_read(&fs_info->defrag_running) == 0)); 1709 - if (flags & MS_RDONLY) 1709 + if (flags & SB_RDONLY) 1710 1710 sync_filesystem(fs_info->sb); 1711 1711 } 1712 1712 } ··· 1766 1766 btrfs_resize_thread_pool(fs_info, 1767 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 1770 goto out; 1771 1771 1772 - if (*flags & MS_RDONLY) { 1772 + if (*flags & SB_RDONLY) { 1773 1773 /* 1774 1774 * this also happens on 'umount -rf' or on shutdown, when 1775 1775 * the filesystem is busy. ··· 1781 1781 /* avoid complains from lockdep et al. */ 1782 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 1788 * sleep at the next loop if it's already active. 1789 1789 * If it's already asleep, we'll leave unused block 1790 1790 * groups on disk until we're mounted read-write again ··· 1856 1856 goto restore; 1857 1857 } 1858 1858 } 1859 - sb->s_flags &= ~MS_RDONLY; 1859 + sb->s_flags &= ~SB_RDONLY; 1860 1860 1861 1861 set_bit(BTRFS_FS_OPEN, &fs_info->flags); 1862 1862 } ··· 1866 1866 return 0; 1867 1867 1868 1868 restore: 1869 - /* We've hit an error - don't reset MS_RDONLY */ 1869 + /* We've hit an error - don't reset SB_RDONLY */ 1870 1870 if (sb_rdonly(sb)) 1871 - old_flags |= MS_RDONLY; 1871 + old_flags |= SB_RDONLY; 1872 1872 sb->s_flags = old_flags; 1873 1873 fs_info->mount_opt = old_opts; 1874 1874 fs_info->compress_type = old_compress_type;
+2 -2
fs/btrfs/volumes.c
··· 2384 2384 set_blocksize(device->bdev, BTRFS_BDEV_BLOCKSIZE); 2385 2385 2386 2386 if (seeding_dev) { 2387 - sb->s_flags &= ~MS_RDONLY; 2387 + sb->s_flags &= ~SB_RDONLY; 2388 2388 ret = btrfs_prepare_sprout(fs_info); 2389 2389 if (ret) { 2390 2390 btrfs_abort_transaction(trans, ret); ··· 2497 2497 btrfs_sysfs_rm_device_link(fs_info->fs_devices, device); 2498 2498 error_trans: 2499 2499 if (seeding_dev) 2500 - sb->s_flags |= MS_RDONLY; 2500 + sb->s_flags |= SB_RDONLY; 2501 2501 if (trans) 2502 2502 btrfs_end_transaction(trans); 2503 2503 rcu_string_free(device->name);
+4 -4
fs/ceph/super.c
··· 331 331 break; 332 332 #ifdef CONFIG_CEPH_FS_POSIX_ACL 333 333 case Opt_acl: 334 - fsopt->sb_flags |= MS_POSIXACL; 334 + fsopt->sb_flags |= SB_POSIXACL; 335 335 break; 336 336 #endif 337 337 case Opt_noacl: 338 - fsopt->sb_flags &= ~MS_POSIXACL; 338 + fsopt->sb_flags &= ~SB_POSIXACL; 339 339 break; 340 340 default: 341 341 BUG_ON(token); ··· 520 520 seq_puts(m, ",nopoolperm"); 521 521 522 522 #ifdef CONFIG_CEPH_FS_POSIX_ACL 523 - if (fsopt->sb_flags & MS_POSIXACL) 523 + if (fsopt->sb_flags & SB_POSIXACL) 524 524 seq_puts(m, ",acl"); 525 525 else 526 526 seq_puts(m, ",noacl"); ··· 988 988 dout("ceph_mount\n"); 989 989 990 990 #ifdef CONFIG_CEPH_FS_POSIX_ACL 991 - flags |= MS_POSIXACL; 991 + flags |= SB_POSIXACL; 992 992 #endif 993 993 err = parse_mount_options(&fsopt, &opt, flags, data, dev_name); 994 994 if (err < 0) {
+1 -1
fs/cifs/cifs_fs_sb.h
··· 42 42 #define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */ 43 43 #define CIFS_MOUNT_STRICT_IO 0x40000 /* strict cache mode */ 44 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 46 #define CIFS_MOUNT_CIFS_BACKUPUID 0x200000 /* backup intent bit for a user */ 47 47 #define CIFS_MOUNT_CIFS_BACKUPGID 0x400000 /* backup intent bit for a group */ 48 48 #define CIFS_MOUNT_MAP_SFM_CHR 0x800000 /* SFM/MAC mapping for illegal chars */
+6 -6
fs/cifs/cifsfs.c
··· 125 125 tcon = cifs_sb_master_tcon(cifs_sb); 126 126 127 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 130 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) 131 131 sb->s_maxbytes = MAX_LFS_FILESIZE; ··· 497 497 seq_puts(s, ",cifsacl"); 498 498 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) 499 499 seq_puts(s, ",dynperm"); 500 - if (root->d_sb->s_flags & MS_POSIXACL) 500 + if (root->d_sb->s_flags & SB_POSIXACL) 501 501 seq_puts(s, ",acl"); 502 502 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) 503 503 seq_puts(s, ",mfsymlinks"); ··· 573 573 static int cifs_remount(struct super_block *sb, int *flags, char *data) 574 574 { 575 575 sync_filesystem(sb); 576 - *flags |= MS_NODIRATIME; 576 + *flags |= SB_NODIRATIME; 577 577 return 0; 578 578 } 579 579 ··· 708 708 709 709 rc = cifs_mount(cifs_sb, volume_info); 710 710 if (rc) { 711 - if (!(flags & MS_SILENT)) 711 + if (!(flags & SB_SILENT)) 712 712 cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n", 713 713 rc); 714 714 root = ERR_PTR(rc); ··· 720 720 mnt_data.flags = flags; 721 721 722 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 725 sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data); 726 726 if (IS_ERR(sb)) { ··· 739 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 745 root = cifs_get_root(volume_info, sb);
+2 -2
fs/cifs/cifsglob.h
··· 559 559 CIFS_MOUNT_MULTIUSER | CIFS_MOUNT_STRICT_IO | \ 560 560 CIFS_MOUNT_CIFS_BACKUPUID | CIFS_MOUNT_CIFS_BACKUPGID) 561 561 562 - #define CIFS_MS_MASK (MS_RDONLY | MS_MANDLOCK | MS_NOEXEC | MS_NOSUID | \ 563 - MS_NODEV | MS_SYNCHRONOUS) 562 + #define CIFS_MS_MASK (SB_RDONLY | SB_MANDLOCK | SB_NOEXEC | SB_NOSUID | \ 563 + SB_NODEV | SB_SYNCHRONOUS) 564 564 565 565 struct cifs_mnt_data { 566 566 struct cifs_sb_info *cifs_sb;
+1 -1
fs/cifs/inode.c
··· 985 985 } 986 986 987 987 cifs_fattr_to_inode(inode, fattr); 988 - if (sb->s_flags & MS_NOATIME) 988 + if (sb->s_flags & SB_NOATIME) 989 989 inode->i_flags |= S_NOATIME | S_NOCMTIME; 990 990 if (inode->i_state & I_NEW) { 991 991 inode->i_ino = hash;
+4 -4
fs/cifs/xattr.c
··· 117 117 #ifdef CONFIG_CIFS_POSIX 118 118 if (!value) 119 119 goto out; 120 - if (sb->s_flags & MS_POSIXACL) 120 + if (sb->s_flags & SB_POSIXACL) 121 121 rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, 122 122 value, (const int)size, 123 123 ACL_TYPE_ACCESS, cifs_sb->local_nls, ··· 129 129 #ifdef CONFIG_CIFS_POSIX 130 130 if (!value) 131 131 goto out; 132 - if (sb->s_flags & MS_POSIXACL) 132 + if (sb->s_flags & SB_POSIXACL) 133 133 rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, 134 134 value, (const int)size, 135 135 ACL_TYPE_DEFAULT, cifs_sb->local_nls, ··· 266 266 267 267 case XATTR_ACL_ACCESS: 268 268 #ifdef CONFIG_CIFS_POSIX 269 - if (sb->s_flags & MS_POSIXACL) 269 + if (sb->s_flags & SB_POSIXACL) 270 270 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, 271 271 value, size, ACL_TYPE_ACCESS, 272 272 cifs_sb->local_nls, ··· 276 276 277 277 case XATTR_ACL_DEFAULT: 278 278 #ifdef CONFIG_CIFS_POSIX 279 - if (sb->s_flags & MS_POSIXACL) 279 + if (sb->s_flags & SB_POSIXACL) 280 280 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, 281 281 value, size, ACL_TYPE_DEFAULT, 282 282 cifs_sb->local_nls,
+2 -2
fs/coda/inode.c
··· 96 96 static int coda_remount(struct super_block *sb, int *flags, char *data) 97 97 { 98 98 sync_filesystem(sb); 99 - *flags |= MS_NOATIME; 99 + *flags |= SB_NOATIME; 100 100 return 0; 101 101 } 102 102 ··· 188 188 mutex_unlock(&vc->vc_mutex); 189 189 190 190 sb->s_fs_info = vc; 191 - sb->s_flags |= MS_NOATIME; 191 + sb->s_flags |= SB_NOATIME; 192 192 sb->s_blocksize = 4096; /* XXXXX what do we put here?? */ 193 193 sb->s_blocksize_bits = 12; 194 194 sb->s_magic = CODA_SUPER_MAGIC;
+2 -2
fs/cramfs/inode.c
··· 505 505 static int cramfs_remount(struct super_block *sb, int *flags, char *data) 506 506 { 507 507 sync_filesystem(sb); 508 - *flags |= MS_RDONLY; 508 + *flags |= SB_RDONLY; 509 509 return 0; 510 510 } 511 511 ··· 592 592 struct inode *root; 593 593 594 594 /* Set it all up.. */ 595 - sb->s_flags |= MS_RDONLY; 595 + sb->s_flags |= SB_RDONLY; 596 596 sb->s_op = &cramfs_ops; 597 597 root = get_cramfs_inode(sb, cramfs_root, 0); 598 598 if (IS_ERR(root))
+4 -4
fs/ecryptfs/main.c
··· 560 560 * Set the POSIX ACL flag based on whether they're enabled in the lower 561 561 * mount. 562 562 */ 563 - s->s_flags = flags & ~MS_POSIXACL; 564 - s->s_flags |= path.dentry->d_sb->s_flags & MS_POSIXACL; 563 + s->s_flags = flags & ~SB_POSIXACL; 564 + s->s_flags |= path.dentry->d_sb->s_flags & SB_POSIXACL; 565 565 566 566 /** 567 567 * Force a read-only eCryptfs mount when: ··· 569 569 * 2) The ecryptfs_encrypted_view mount option is specified 570 570 */ 571 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 574 s->s_maxbytes = path.dentry->d_sb->s_maxbytes; 575 575 s->s_blocksize = path.dentry->d_sb->s_blocksize; ··· 602 602 ecryptfs_set_dentry_private(s->s_root, root_info); 603 603 root_info->lower_path = path; 604 604 605 - s->s_flags |= MS_ACTIVE; 605 + s->s_flags |= SB_ACTIVE; 606 606 return dget(s->s_root); 607 607 608 608 out_free:
+2 -2
fs/efs/super.c
··· 116 116 static int efs_remount(struct super_block *sb, int *flags, char *data) 117 117 { 118 118 sync_filesystem(sb); 119 - *flags |= MS_RDONLY; 119 + *flags |= SB_RDONLY; 120 120 return 0; 121 121 } 122 122 ··· 311 311 #ifdef DEBUG 312 312 pr_info("forcing read-only mode\n"); 313 313 #endif 314 - s->s_flags |= MS_RDONLY; 314 + s->s_flags |= SB_RDONLY; 315 315 } 316 316 s->s_op = &efs_superblock_operations; 317 317 s->s_export_op = &efs_export_ops;
+2 -2
fs/ext2/balloc.c
··· 548 548 } 549 549 550 550 mark_buffer_dirty(bitmap_bh); 551 - if (sb->s_flags & MS_SYNCHRONOUS) 551 + if (sb->s_flags & SB_SYNCHRONOUS) 552 552 sync_dirty_buffer(bitmap_bh); 553 553 554 554 group_adjust_blocks(sb, block_group, desc, bh2, group_freed); ··· 1424 1424 percpu_counter_sub(&sbi->s_freeblocks_counter, num); 1425 1425 1426 1426 mark_buffer_dirty(bitmap_bh); 1427 - if (sb->s_flags & MS_SYNCHRONOUS) 1427 + if (sb->s_flags & SB_SYNCHRONOUS) 1428 1428 sync_dirty_buffer(bitmap_bh); 1429 1429 1430 1430 *errp = 0;
+2 -2
fs/ext2/ialloc.c
··· 145 145 else 146 146 ext2_release_inode(sb, block_group, is_directory); 147 147 mark_buffer_dirty(bitmap_bh); 148 - if (sb->s_flags & MS_SYNCHRONOUS) 148 + if (sb->s_flags & SB_SYNCHRONOUS) 149 149 sync_dirty_buffer(bitmap_bh); 150 150 151 151 brelse(bitmap_bh); ··· 517 517 goto fail; 518 518 got: 519 519 mark_buffer_dirty(bitmap_bh); 520 - if (sb->s_flags & MS_SYNCHRONOUS) 520 + if (sb->s_flags & SB_SYNCHRONOUS) 521 521 sync_dirty_buffer(bitmap_bh); 522 522 brelse(bitmap_bh); 523 523
+10 -10
fs/ext2/super.c
··· 75 75 if (test_opt(sb, ERRORS_RO)) { 76 76 ext2_msg(sb, KERN_CRIT, 77 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 656 ext2_msg(sb, KERN_ERR, 657 657 "error: revision level too high, " 658 658 "forcing read-only mode"); 659 - res = MS_RDONLY; 659 + res = SB_RDONLY; 660 660 } 661 661 if (read_only) 662 662 return res; ··· 924 924 sbi->s_resuid = opts.s_resuid; 925 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 928 ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? 929 - MS_POSIXACL : 0); 929 + SB_POSIXACL : 0); 930 930 sb->s_iflags |= SB_I_CGROUPWB; 931 931 932 932 if (le32_to_cpu(es->s_rev_level) == EXT2_GOOD_OLD_REV && ··· 1178 1178 ext2_msg(sb, KERN_WARNING, 1179 1179 "warning: mounting ext3 filesystem as ext2"); 1180 1180 if (ext2_setup_super (sb, es, sb_rdonly(sb))) 1181 - sb->s_flags |= MS_RDONLY; 1181 + sb->s_flags |= SB_RDONLY; 1182 1182 ext2_write_super(sb); 1183 1183 return 0; 1184 1184 ··· 1341 1341 "dax flag with busy inodes while remounting"); 1342 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 1345 goto out_set; 1346 - if (*flags & MS_RDONLY) { 1346 + if (*flags & SB_RDONLY) { 1347 1347 if (le16_to_cpu(es->s_state) & EXT2_VALID_FS || 1348 1348 !(sbi->s_mount_state & EXT2_VALID_FS)) 1349 1349 goto out_set; ··· 1379 1379 */ 1380 1380 sbi->s_mount_state = le16_to_cpu(es->s_state); 1381 1381 if (!ext2_setup_super (sb, es, 0)) 1382 - sb->s_flags &= ~MS_RDONLY; 1382 + sb->s_flags &= ~SB_RDONLY; 1383 1383 spin_unlock(&sbi->s_lock); 1384 1384 1385 1385 ext2_write_super(sb); ··· 1392 1392 sbi->s_mount_opt = new_opts.s_mount_opt; 1393 1393 sbi->s_resuid = new_opts.s_resuid; 1394 1394 sbi->s_resgid = new_opts.s_resgid; 1395 - sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 1396 - ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); 1395 + sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 1396 + ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? SB_POSIXACL : 0); 1397 1397 spin_unlock(&sbi->s_lock); 1398 1398 1399 1399 return 0;
+2 -2
fs/ext4/inode.c
··· 2742 2742 * If the filesystem has aborted, it is read-only, so return 2743 2743 * right away instead of dumping stack traces later on that 2744 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 2746 * the latter could be true if the filesystem is mounted 2747 2747 * read-only, and in that case, ext4_writepages should 2748 2748 * *never* be called, so if that ever happens, we would want ··· 5183 5183 5184 5184 ext4_inode_csum_set(inode, raw_inode, ei); 5185 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 5187 ext4_update_other_inodes_time(inode->i_sb, inode->i_ino, 5188 5188 bh->b_data); 5189 5189
+26 -26
fs/ext4/super.c
··· 422 422 * before ->s_flags update 423 423 */ 424 424 smp_wmb(); 425 - sb->s_flags |= MS_RDONLY; 425 + sb->s_flags |= SB_RDONLY; 426 426 } 427 427 if (test_opt(sb, ERRORS_PANIC)) { 428 428 if (EXT4_SB(sb)->s_journal && ··· 635 635 * before ->s_flags update 636 636 */ 637 637 smp_wmb(); 638 - sb->s_flags |= MS_RDONLY; 638 + sb->s_flags |= SB_RDONLY; 639 639 if (EXT4_SB(sb)->s_journal) 640 640 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); 641 641 save_error_info(sb, function, line); ··· 1682 1682 sb->s_flags |= SB_I_VERSION; 1683 1683 return 1; 1684 1684 case Opt_lazytime: 1685 - sb->s_flags |= MS_LAZYTIME; 1685 + sb->s_flags |= SB_LAZYTIME; 1686 1686 return 1; 1687 1687 case Opt_nolazytime: 1688 - sb->s_flags &= ~MS_LAZYTIME; 1688 + sb->s_flags &= ~SB_LAZYTIME; 1689 1689 return 1; 1690 1690 } 1691 1691 ··· 2116 2116 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { 2117 2117 ext4_msg(sb, KERN_ERR, "revision level too high, " 2118 2118 "forcing read-only mode"); 2119 - res = MS_RDONLY; 2119 + res = SB_RDONLY; 2120 2120 } 2121 2121 if (read_only) 2122 2122 goto done; ··· 2429 2429 2430 2430 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { 2431 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 2433 ext4_msg(sb, KERN_INFO, "Errors on filesystem, " 2434 2434 "clearing orphan list.\n"); 2435 2435 es->s_last_orphan = 0; ··· 2438 2438 return; 2439 2439 } 2440 2440 2441 - if (s_flags & MS_RDONLY) { 2441 + if (s_flags & SB_RDONLY) { 2442 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 2445 #ifdef CONFIG_QUOTA 2446 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 2450 * Turn on quotas which were not enabled for read-only mounts if 2451 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 2454 int ret = ext4_enable_quotas(sb); 2455 2455 2456 2456 if (!ret) ··· 2539 2539 } 2540 2540 } 2541 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 2741 2742 2742 if (ext4_has_feature_readonly(sb)) { 2743 2743 ext4_msg(sb, KERN_INFO, "filesystem is read-only"); 2744 - sb->s_flags |= MS_RDONLY; 2744 + sb->s_flags |= SB_RDONLY; 2745 2745 return 1; 2746 2746 } 2747 2747 ··· 3623 3623 sb->s_iflags |= SB_I_CGROUPWB; 3624 3624 } 3625 3625 3626 - sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 3627 - (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0); 3626 + sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 3627 + (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0); 3628 3628 3629 3629 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV && 3630 3630 (ext4_has_compat_features(sb) || ··· 4199 4199 } 4200 4200 4201 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 4204 /* determine the minimum size of new large inodes, if present */ 4205 4205 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE && ··· 4693 4693 * the clock is set in the future, and this will cause e2fsck 4694 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 4697 es->s_wtime = cpu_to_le32(get_seconds()); 4698 4698 if (sb->s_bdev->bd_part) 4699 4699 es->s_kbytes_written = ··· 5047 5047 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) 5048 5048 ext4_abort(sb, "Abort forced by user"); 5049 5049 5050 - sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 5051 - (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0); 5050 + sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 5051 + (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0); 5052 5052 5053 5053 es = sbi->s_es; 5054 5054 ··· 5057 5057 set_task_ioprio(sbi->s_journal->j_task, journal_ioprio); 5058 5058 } 5059 5059 5060 - if (*flags & MS_LAZYTIME) 5061 - sb->s_flags |= MS_LAZYTIME; 5060 + if (*flags & SB_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 5064 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { 5065 5065 err = -EROFS; 5066 5066 goto restore_opts; 5067 5067 } 5068 5068 5069 - if (*flags & MS_RDONLY) { 5069 + if (*flags & SB_RDONLY) { 5070 5070 err = sync_filesystem(sb); 5071 5071 if (err < 0) 5072 5072 goto restore_opts; ··· 5078 5078 * First of all, the unconditional stuff we have to do 5079 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 5084 * OK, test if we are remounting a valid rw partition ··· 5140 5140 ext4_clear_journal_err(sb, es); 5141 5141 sbi->s_mount_state = le16_to_cpu(es->s_state); 5142 5142 if (!ext4_setup_super(sb, es, 0)) 5143 - sb->s_flags &= ~MS_RDONLY; 5143 + sb->s_flags &= ~SB_RDONLY; 5144 5144 if (ext4_has_feature_mmp(sb)) 5145 5145 if (ext4_multi_mount_protect(sb, 5146 5146 le64_to_cpu(es->s_mmp_block))) { ··· 5164 5164 } 5165 5165 5166 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 5168 ext4_commit_super(sb, 1); 5169 5169 5170 5170 #ifdef CONFIG_QUOTA ··· 5182 5182 } 5183 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 5186 ext4_msg(sb, KERN_INFO, "re-mounted. Opts: %s", orig_data); 5187 5187 kfree(orig_data); 5188 5188 return 0;
+5 -5
fs/f2fs/checkpoint.c
··· 617 617 if (!is_set_ckpt_flags(sbi, CP_ORPHAN_PRESENT_FLAG)) 618 618 return 0; 619 619 620 - if (s_flags & MS_RDONLY) { 620 + if (s_flags & SB_RDONLY) { 621 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 625 #ifdef CONFIG_QUOTA 626 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 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 631 #endif 632 632 633 633 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi); ··· 658 658 if (quota_enabled) 659 659 f2fs_quota_off_umount(sbi->sb); 660 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 663 return err; 664 664 }
+1 -1
fs/f2fs/f2fs.h
··· 2378 2378 2379 2379 static 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 2384 2384 static inline bool f2fs_cp_error(struct f2fs_sb_info *sbi)
+1 -1
fs/f2fs/gc.c
··· 1005 1005 1006 1006 cpc.reason = __get_cp_reason(sbi); 1007 1007 gc_more: 1008 - if (unlikely(!(sbi->sb->s_flags & MS_ACTIVE))) { 1008 + if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { 1009 1009 ret = -EINVAL; 1010 1010 goto stop; 1011 1011 }
+5 -5
fs/f2fs/recovery.c
··· 598 598 int quota_enabled; 599 599 #endif 600 600 601 - if (s_flags & MS_RDONLY) { 601 + if (s_flags & SB_RDONLY) { 602 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 606 #ifdef CONFIG_QUOTA 607 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 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 611 #endif 612 612 613 613 fsync_entry_slab = f2fs_kmem_cache_create("f2fs_fsync_inode_entry", ··· 671 671 if (quota_enabled) 672 672 f2fs_quota_off_umount(sbi->sb); 673 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 676 return ret ? ret: err; 677 677 }
+14 -14
fs/f2fs/super.c
··· 534 534 #endif 535 535 break; 536 536 case Opt_lazytime: 537 - sb->s_flags |= MS_LAZYTIME; 537 + sb->s_flags |= SB_LAZYTIME; 538 538 break; 539 539 case Opt_nolazytime: 540 - sb->s_flags &= ~MS_LAZYTIME; 540 + sb->s_flags &= ~SB_LAZYTIME; 541 541 break; 542 542 #ifdef CONFIG_QUOTA 543 543 case Opt_quota: ··· 1168 1168 set_opt(sbi, INLINE_DENTRY); 1169 1169 set_opt(sbi, EXTENT_CACHE); 1170 1170 set_opt(sbi, NOHEAP); 1171 - sbi->sb->s_flags |= MS_LAZYTIME; 1171 + sbi->sb->s_flags |= SB_LAZYTIME; 1172 1172 set_opt(sbi, FLUSH_MERGE); 1173 1173 if (f2fs_sb_mounted_blkzoned(sbi->sb)) { 1174 1174 set_opt_mode(sbi, F2FS_MOUNT_LFS); ··· 1236 1236 #endif 1237 1237 1238 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 1240 err = f2fs_commit_super(sbi, false); 1241 1241 f2fs_msg(sb, KERN_INFO, 1242 1242 "Try to recover all the superblocks, ret: %d", err); ··· 1255 1255 * Previous and new state of filesystem is RO, 1256 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 1259 goto skip; 1260 1260 1261 1261 #ifdef CONFIG_QUOTA 1262 - if (!f2fs_readonly(sb) && (*flags & MS_RDONLY)) { 1262 + if (!f2fs_readonly(sb) && (*flags & SB_RDONLY)) { 1263 1263 err = dquot_suspend(sb, -1); 1264 1264 if (err < 0) 1265 1265 goto restore_opts; 1266 1266 } else { 1267 1267 /* dquot_resume needs RW */ 1268 - sb->s_flags &= ~MS_RDONLY; 1268 + sb->s_flags &= ~SB_RDONLY; 1269 1269 if (sb_any_quota_suspended(sb)) { 1270 1270 dquot_resume(sb, -1); 1271 1271 } else if (f2fs_sb_has_quota_ino(sb)) { ··· 1288 1288 * or if background_gc = off is passed in mount 1289 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 1292 if (sbi->gc_thread) { 1293 1293 stop_gc_thread(sbi); 1294 1294 need_restart_gc = true; ··· 1300 1300 need_stop_gc = true; 1301 1301 } 1302 1302 1303 - if (*flags & MS_RDONLY) { 1303 + if (*flags & SB_RDONLY) { 1304 1304 writeback_inodes_sb(sb, WB_REASON_SYNC); 1305 1305 sync_inodes_sb(sb); 1306 1306 ··· 1314 1314 * We stop issue flush thread if FS is mounted as RO 1315 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 1318 clear_opt(sbi, FLUSH_MERGE); 1319 1319 destroy_flush_cmd_control(sbi, false); 1320 1320 } else { ··· 1329 1329 kfree(s_qf_names[i]); 1330 1330 #endif 1331 1331 /* Update the POSIXACL Flag */ 1332 - sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 1333 - (test_opt(sbi, POSIX_ACL) ? MS_POSIXACL : 0); 1332 + sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 1333 + (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0); 1334 1334 1335 1335 return 0; 1336 1336 restore_gc: ··· 2472 2472 sb->s_export_op = &f2fs_export_ops; 2473 2473 sb->s_magic = F2FS_SUPER_MAGIC; 2474 2474 sb->s_time_gran = 1; 2475 - sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 2476 - (test_opt(sbi, POSIX_ACL) ? MS_POSIXACL : 0); 2475 + sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 2476 + (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0); 2477 2477 memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid)); 2478 2478 2479 2479 /* init f2fs-specific super block info */
+3 -3
fs/fat/fatent.c
··· 392 392 memcpy(c_bh->b_data, bhs[n]->b_data, sb->s_blocksize); 393 393 set_buffer_uptodate(c_bh); 394 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 396 err = sync_dirty_buffer(c_bh); 397 397 brelse(c_bh); 398 398 if (err) ··· 597 597 } 598 598 599 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 601 err = fat_sync_bhs(bhs, nr_bhs); 602 602 if (err) 603 603 goto error; ··· 612 612 fat_collect_bhs(bhs, &nr_bhs, &fatent); 613 613 } while (cluster != FAT_ENT_EOF); 614 614 615 - if (sb->s_flags & MS_SYNCHRONOUS) { 615 + if (sb->s_flags & SB_SYNCHRONOUS) { 616 616 err = fat_sync_bhs(bhs, nr_bhs); 617 617 if (err) 618 618 goto error;
+4 -4
fs/fat/inode.c
··· 781 781 { 782 782 int new_rdonly; 783 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 786 sync_filesystem(sb); 787 787 788 788 /* make sure we update state on remount. */ 789 - new_rdonly = *flags & MS_RDONLY; 789 + new_rdonly = *flags & SB_RDONLY; 790 790 if (new_rdonly != sb_rdonly(sb)) { 791 791 if (new_rdonly) 792 792 fat_set_state(sb, 0, 0); ··· 1352 1352 if (opts->unicode_xlate) 1353 1353 opts->utf8 = 0; 1354 1354 if (opts->nfs == FAT_NFS_NOSTALE_RO) { 1355 - sb->s_flags |= MS_RDONLY; 1355 + sb->s_flags |= SB_RDONLY; 1356 1356 sb->s_export_op = &fat_export_ops_nostale; 1357 1357 } 1358 1358 ··· 1608 1608 return -ENOMEM; 1609 1609 sb->s_fs_info = sbi; 1610 1610 1611 - sb->s_flags |= MS_NODIRATIME; 1611 + sb->s_flags |= SB_NODIRATIME; 1612 1612 sb->s_magic = MSDOS_SUPER_MAGIC; 1613 1613 sb->s_op = &fat_sops; 1614 1614 sb->s_export_op = &fat_export_ops;
+1 -1
fs/fat/misc.c
··· 33 33 if (opts->errors == FAT_ERRORS_PANIC) 34 34 panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id); 35 35 else if (opts->errors == FAT_ERRORS_RO && !sb_rdonly(sb)) { 36 - sb->s_flags |= MS_RDONLY; 36 + sb->s_flags |= SB_RDONLY; 37 37 fat_msg(sb, KERN_ERR, "Filesystem has been set read-only"); 38 38 } 39 39 }
+1 -1
fs/fat/namei_msdos.c
··· 646 646 { 647 647 MSDOS_SB(sb)->dir_ops = &msdos_dir_inode_operations; 648 648 sb->s_d_op = &msdos_dentry_operations; 649 - sb->s_flags |= MS_NOATIME; 649 + sb->s_flags |= SB_NOATIME; 650 650 } 651 651 652 652 static int msdos_fill_super(struct super_block *sb, void *data, int silent)
+2 -2
fs/freevxfs/vxfs_super.c
··· 116 116 static int vxfs_remount(struct super_block *sb, int *flags, char *data) 117 117 { 118 118 sync_filesystem(sb); 119 - *flags |= MS_RDONLY; 119 + *flags |= SB_RDONLY; 120 120 return 0; 121 121 } 122 122 ··· 220 220 int ret = -EINVAL; 221 221 u32 j; 222 222 223 - sbp->s_flags |= MS_RDONLY; 223 + sbp->s_flags |= SB_RDONLY; 224 224 225 225 infp = kzalloc(sizeof(*infp), GFP_KERNEL); 226 226 if (!infp) {
+1 -1
fs/fs-writeback.c
··· 490 490 491 491 /* while holding I_WB_SWITCH, no one else can update the association */ 492 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 494 inode->i_state & (I_WB_SWITCH | I_FREEING) || 495 495 inode_to_wb(inode) == isw->new_wb) { 496 496 spin_unlock(&inode->i_lock);
+6 -6
fs/fuse/inode.c
··· 130 130 { 131 131 truncate_inode_pages_final(&inode->i_data); 132 132 clear_inode(inode); 133 - if (inode->i_sb->s_flags & MS_ACTIVE) { 133 + if (inode->i_sb->s_flags & SB_ACTIVE) { 134 134 struct fuse_conn *fc = get_fuse_conn(inode); 135 135 struct fuse_inode *fi = get_fuse_inode(inode); 136 136 fuse_queue_forget(fc, fi->forget, fi->nodeid, fi->nlookup); ··· 141 141 static int fuse_remount_fs(struct super_block *sb, int *flags, char *data) 142 142 { 143 143 sync_filesystem(sb); 144 - if (*flags & MS_MANDLOCK) 144 + if (*flags & SB_MANDLOCK) 145 145 return -EINVAL; 146 146 147 147 return 0; ··· 1056 1056 int is_bdev = sb->s_bdev != NULL; 1057 1057 1058 1058 err = -EINVAL; 1059 - if (sb->s_flags & MS_MANDLOCK) 1059 + if (sb->s_flags & SB_MANDLOCK) 1060 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 1064 if (!parse_fuse_opt(data, &d, is_bdev)) 1065 1065 goto err; ··· 1109 1109 goto err_dev_free; 1110 1110 1111 1111 /* Handle umasking inside the fuse code */ 1112 - if (sb->s_flags & MS_POSIXACL) 1112 + if (sb->s_flags & SB_POSIXACL) 1113 1113 fc->dont_mask = 1; 1114 - sb->s_flags |= MS_POSIXACL; 1114 + sb->s_flags |= SB_POSIXACL; 1115 1115 1116 1116 fc->default_permissions = d.default_permissions; 1117 1117 fc->allow_other = d.allow_other;
+8 -8
fs/gfs2/ops_fstype.c
··· 1065 1065 sdp->sd_args = *args; 1066 1066 1067 1067 if (sdp->sd_args.ar_spectator) { 1068 - sb->s_flags |= MS_RDONLY; 1068 + sb->s_flags |= SB_RDONLY; 1069 1069 set_bit(SDF_RORECOVERY, &sdp->sd_flags); 1070 1070 } 1071 1071 if (sdp->sd_args.ar_posix_acl) 1072 - sb->s_flags |= MS_POSIXACL; 1072 + sb->s_flags |= SB_POSIXACL; 1073 1073 if (sdp->sd_args.ar_nobarrier) 1074 1074 set_bit(SDF_NOBARRIERS, &sdp->sd_flags); 1075 1075 1076 - sb->s_flags |= MS_NOSEC; 1076 + sb->s_flags |= SB_NOSEC; 1077 1077 sb->s_magic = GFS2_MAGIC; 1078 1078 sb->s_op = &gfs2_super_ops; 1079 1079 sb->s_d_op = &gfs2_dops; ··· 1257 1257 struct gfs2_args args; 1258 1258 struct gfs2_sbd *sdp; 1259 1259 1260 - if (!(flags & MS_RDONLY)) 1260 + if (!(flags & SB_RDONLY)) 1261 1261 mode |= FMODE_WRITE; 1262 1262 1263 1263 bdev = blkdev_get_by_path(dev_name, mode, fs_type); ··· 1313 1313 1314 1314 if (s->s_root) { 1315 1315 error = -EBUSY; 1316 - if ((flags ^ s->s_flags) & MS_RDONLY) 1316 + if ((flags ^ s->s_flags) & SB_RDONLY) 1317 1317 goto error_super; 1318 1318 } else { 1319 1319 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev); 1320 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 1322 if (error) 1323 1323 goto error_super; 1324 - s->s_flags |= MS_ACTIVE; 1324 + s->s_flags |= SB_ACTIVE; 1325 1325 bdev->bd_super = s; 1326 1326 } 1327 1327 ··· 1365 1365 pr_warn("gfs2 mount does not exist\n"); 1366 1366 return ERR_CAST(s); 1367 1367 } 1368 - if ((flags ^ s->s_flags) & MS_RDONLY) { 1368 + if ((flags ^ s->s_flags) & SB_RDONLY) { 1369 1369 deactivate_locked_super(s); 1370 1370 return ERR_PTR(-EBUSY); 1371 1371 }
+5 -5
fs/gfs2/super.c
··· 1256 1256 return -EINVAL; 1257 1257 1258 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) { 1262 - if (*flags & MS_RDONLY) 1261 + if ((sb->s_flags ^ *flags) & SB_RDONLY) { 1262 + if (*flags & SB_RDONLY) 1263 1263 error = gfs2_make_fs_ro(sdp); 1264 1264 else 1265 1265 error = gfs2_make_fs_rw(sdp); ··· 1269 1269 1270 1270 sdp->sd_args = args; 1271 1271 if (sdp->sd_args.ar_posix_acl) 1272 - sb->s_flags |= MS_POSIXACL; 1272 + sb->s_flags |= SB_POSIXACL; 1273 1273 else 1274 - sb->s_flags &= ~MS_POSIXACL; 1274 + sb->s_flags &= ~SB_POSIXACL; 1275 1275 if (sdp->sd_args.ar_nobarrier) 1276 1276 set_bit(SDF_NOBARRIERS, &sdp->sd_flags); 1277 1277 else
+1 -1
fs/gfs2/trans.c
··· 117 117 kfree(tr); 118 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 121 gfs2_log_flush(sdp, NULL, NORMAL_FLUSH); 122 122 if (alloced) 123 123 sb_end_intwrite(sdp->sd_vfs);
+2 -2
fs/hfs/mdb.c
··· 204 204 attrib = mdb->drAtrb; 205 205 if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { 206 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 209 if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) { 210 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 213 if (!sb_rdonly(sb)) { 214 214 /* Mark the volume uncleanly unmounted in case we crash */
+8 -8
fs/hfs/super.c
··· 114 114 static int hfs_remount(struct super_block *sb, int *flags, char *data) 115 115 { 116 116 sync_filesystem(sb); 117 - *flags |= MS_NODIRATIME; 118 - if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 117 + *flags |= SB_NODIRATIME; 118 + if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb)) 119 119 return 0; 120 - if (!(*flags & MS_RDONLY)) { 120 + if (!(*flags & SB_RDONLY)) { 121 121 if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { 122 122 pr_warn("filesystem was not cleanly unmounted, running fsck.hfs is recommended. leaving read-only.\n"); 123 - sb->s_flags |= MS_RDONLY; 124 - *flags |= MS_RDONLY; 123 + sb->s_flags |= SB_RDONLY; 124 + *flags |= SB_RDONLY; 125 125 } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { 126 126 pr_warn("filesystem is marked locked, leaving read-only.\n"); 127 - sb->s_flags |= MS_RDONLY; 128 - *flags |= MS_RDONLY; 127 + sb->s_flags |= SB_RDONLY; 128 + *flags |= SB_RDONLY; 129 129 } 130 130 } 131 131 return 0; ··· 407 407 408 408 sb->s_op = &hfs_super_operations; 409 409 sb->s_xattr = hfs_xattr_handlers; 410 - sb->s_flags |= MS_NODIRATIME; 410 + sb->s_flags |= SB_NODIRATIME; 411 411 mutex_init(&sbi->bitmap_lock); 412 412 413 413 res = hfs_mdb_get(sb);
+11 -11
fs/hfsplus/super.c
··· 329 329 static int hfsplus_remount(struct super_block *sb, int *flags, char *data) 330 330 { 331 331 sync_filesystem(sb); 332 - if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 332 + if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb)) 333 333 return 0; 334 - if (!(*flags & MS_RDONLY)) { 334 + if (!(*flags & SB_RDONLY)) { 335 335 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr; 336 336 int force = 0; 337 337 ··· 340 340 341 341 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { 342 342 pr_warn("filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. leaving read-only.\n"); 343 - sb->s_flags |= MS_RDONLY; 344 - *flags |= MS_RDONLY; 343 + sb->s_flags |= SB_RDONLY; 344 + *flags |= SB_RDONLY; 345 345 } else if (force) { 346 346 /* nothing */ 347 347 } else if (vhdr->attributes & 348 348 cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 349 349 pr_warn("filesystem is marked locked, leaving read-only.\n"); 350 - sb->s_flags |= MS_RDONLY; 351 - *flags |= MS_RDONLY; 350 + sb->s_flags |= SB_RDONLY; 351 + *flags |= SB_RDONLY; 352 352 } else if (vhdr->attributes & 353 353 cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { 354 354 pr_warn("filesystem is marked journaled, leaving read-only.\n"); 355 - sb->s_flags |= MS_RDONLY; 356 - *flags |= MS_RDONLY; 355 + sb->s_flags |= SB_RDONLY; 356 + *flags |= SB_RDONLY; 357 357 } 358 358 } 359 359 return 0; ··· 455 455 456 456 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { 457 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 459 } else if (test_and_clear_bit(HFSPLUS_SB_FORCE, &sbi->flags)) { 460 460 /* nothing */ 461 461 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 462 462 pr_warn("Filesystem is marked locked, mounting read-only.\n"); 463 - sb->s_flags |= MS_RDONLY; 463 + sb->s_flags |= SB_RDONLY; 464 464 } else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) && 465 465 !sb_rdonly(sb)) { 466 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 470 err = -EINVAL;
+1 -1
fs/hpfs/map.c
··· 288 288 goto bail; 289 289 } 290 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 292 hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); 293 293 goto bail; 294 294 }
+4 -4
fs/hpfs/super.c
··· 78 78 else { 79 79 pr_cont("; remounting read-only\n"); 80 80 mark_dirty(s, 0); 81 - s->s_flags |= MS_RDONLY; 81 + s->s_flags |= SB_RDONLY; 82 82 } 83 83 } else if (sb_rdonly(s)) 84 84 pr_cont("; going on - but anything won't be destroyed because it's read-only\n"); ··· 457 457 458 458 sync_filesystem(s); 459 459 460 - *flags |= MS_NOATIME; 460 + *flags |= SB_NOATIME; 461 461 462 462 hpfs_lock(s); 463 463 uid = sbi->sb_uid; gid = sbi->sb_gid; ··· 488 488 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk; 489 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 493 hpfs_unlock(s); 494 494 return 0; ··· 614 614 goto bail4; 615 615 } 616 616 617 - s->s_flags |= MS_NOATIME; 617 + s->s_flags |= SB_NOATIME; 618 618 619 619 /* Fill superblock stuff */ 620 620 s->s_magic = HPFS_SUPER_MAGIC;
+5 -5
fs/inode.c
··· 416 416 { 417 417 if (!(inode->i_state & (I_DIRTY_ALL | I_SYNC | 418 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 420 inode_lru_list_add(inode); 421 421 } 422 422 ··· 595 595 * @sb: superblock to operate on 596 596 * 597 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 599 * so any inode reaching zero refcount during or after that call will 600 600 * be immediately evicted. 601 601 */ ··· 1492 1492 else 1493 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 1496 inode_add_lru(inode); 1497 1497 spin_unlock(&inode->i_lock); 1498 1498 return; ··· 1644 1644 if (flags & S_MTIME) 1645 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 1648 iflags |= I_DIRTY_SYNC; 1649 1649 __mark_inode_dirty(inode, iflags); 1650 1650 return 0; ··· 1691 1691 1692 1692 if (IS_NOATIME(inode)) 1693 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 1695 return false; 1696 1696 1697 1697 if (mnt->mnt_flags & MNT_NOATIME)
+1 -1
fs/isofs/inode.c
··· 114 114 static int isofs_remount(struct super_block *sb, int *flags, char *data) 115 115 { 116 116 sync_filesystem(sb); 117 - if (!(*flags & MS_RDONLY)) 117 + if (!(*flags & SB_RDONLY)) 118 118 return -EROFS; 119 119 return 0; 120 120 }
+2 -2
fs/jffs2/fs.c
··· 409 409 mutex_unlock(&c->alloc_sem); 410 410 } 411 411 412 - if (!(*flags & MS_RDONLY)) 412 + if (!(*flags & SB_RDONLY)) 413 413 jffs2_start_garbage_collect_thread(c); 414 414 415 - *flags |= MS_NOATIME; 415 + *flags |= SB_NOATIME; 416 416 return 0; 417 417 } 418 418
+1 -1
fs/jffs2/os-linux.h
··· 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 64 #define SECTOR_ADDR(x) ( (((unsigned long)(x) / c->sector_size) * c->sector_size) ) 65 65 #ifndef CONFIG_JFFS2_FS_WRITEBUFFER
+2 -2
fs/jffs2/super.c
··· 301 301 302 302 sb->s_op = &jffs2_super_operations; 303 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 305 sb->s_xattr = jffs2_xattr_handlers; 306 306 #ifdef CONFIG_JFFS2_FS_POSIX_ACL 307 - sb->s_flags |= MS_POSIXACL; 307 + sb->s_flags |= SB_POSIXACL; 308 308 #endif 309 309 ret = jffs2_do_fill_super(sb, data, silent); 310 310 return ret;
+5 -5
fs/jfs/super.c
··· 87 87 else if (sbi->flag & JFS_ERR_REMOUNT_RO) { 88 88 jfs_err("ERROR: (device %s): remounting filesystem as read-only", 89 89 sb->s_id); 90 - sb->s_flags |= MS_RDONLY; 90 + sb->s_flags |= SB_RDONLY; 91 91 } 92 92 93 93 /* nothing is done for continue beyond marking the superblock dirty */ ··· 477 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 482 * Invalidate any previously read metadata. fsck may have 483 483 * changed the on-disk data since we mounted r/o ··· 488 488 ret = jfs_mount_rw(sb, 1); 489 489 490 490 /* mark the fs r/w for quota activity */ 491 - sb->s_flags &= ~MS_RDONLY; 491 + sb->s_flags &= ~SB_RDONLY; 492 492 493 493 dquot_resume(sb, -1); 494 494 return ret; 495 495 } 496 - if (!sb_rdonly(sb) && (*flags & MS_RDONLY)) { 496 + if (!sb_rdonly(sb) && (*flags & SB_RDONLY)) { 497 497 rc = dquot_suspend(sb, -1); 498 498 if (rc < 0) 499 499 return rc; ··· 545 545 sbi->flag = flag; 546 546 547 547 #ifdef CONFIG_JFS_POSIX_ACL 548 - sb->s_flags |= MS_POSIXACL; 548 + sb->s_flags |= SB_POSIXACL; 549 549 #endif 550 550 551 551 if (newLVSize) {
+1 -1
fs/kernfs/mount.c
··· 335 335 deactivate_locked_super(sb); 336 336 return ERR_PTR(error); 337 337 } 338 - sb->s_flags |= MS_ACTIVE; 338 + sb->s_flags |= SB_ACTIVE; 339 339 340 340 mutex_lock(&kernfs_mutex); 341 341 list_add(&info->node, &root->supers);
+3 -3
fs/libfs.c
··· 246 246 struct inode *root; 247 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 250 &init_user_ns, NULL); 251 251 if (IS_ERR(s)) 252 252 return ERR_CAST(s); ··· 277 277 d_instantiate(dentry, root); 278 278 s->s_root = dentry; 279 279 s->s_d_op = dops; 280 - s->s_flags |= MS_ACTIVE; 280 + s->s_flags |= SB_ACTIVE; 281 281 return dget(s->s_root); 282 282 283 283 Enomem: ··· 578 578 spin_lock(&pin_fs_lock); 579 579 if (unlikely(!*mount)) { 580 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 582 if (IS_ERR(mnt)) 583 583 return PTR_ERR(mnt); 584 584 spin_lock(&pin_fs_lock);
+1 -1
fs/locks.c
··· 141 141 142 142 static 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 147 147 static bool lease_breaking(struct file_lock *fl)
+2 -2
fs/minix/inode.c
··· 125 125 126 126 sync_filesystem(sb); 127 127 ms = sbi->s_ms; 128 - if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 128 + if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb)) 129 129 return 0; 130 - if (*flags & MS_RDONLY) { 130 + if (*flags & SB_RDONLY) { 131 131 if (ms->s_state & MINIX_VALID_FS || 132 132 !(sbi->s_mount_state & MINIX_VALID_FS)) 133 133 return 0;
+2 -2
fs/ncpfs/inode.c
··· 103 103 static int ncp_remount(struct super_block *sb, int *flags, char* data) 104 104 { 105 105 sync_filesystem(sb); 106 - *flags |= MS_NODIRATIME; 106 + *flags |= SB_NODIRATIME; 107 107 return 0; 108 108 } 109 109 ··· 547 547 else 548 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 551 sb->s_maxbytes = 0xFFFFFFFFU; 552 552 sb->s_blocksize = 1024; /* Eh... Is this correct? */ 553 553 sb->s_blocksize_bits = 10;
+1 -1
fs/nfs/dir.c
··· 1256 1256 /* Unhash it, so that ->d_iput() would be called */ 1257 1257 return 1; 1258 1258 } 1259 - if (!(dentry->d_sb->s_flags & MS_ACTIVE)) { 1259 + if (!(dentry->d_sb->s_flags & SB_ACTIVE)) { 1260 1260 /* Unhash it, so that ancestors of killed async unlink 1261 1261 * files will be cleaned up during umount */ 1262 1262 return 1;
+1 -1
fs/nfs/inode.c
··· 752 752 * Note that we only have to check the vfsmount flags here: 753 753 * - NFS always sets S_NOATIME by so checking it would give a 754 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 756 * no point in checking those. 757 757 */ 758 758 if ((path->mnt->mnt_flags & MNT_NOATIME) ||
+1 -1
fs/nfs/internal.h
··· 10 10 #include <linux/nfs_page.h> 11 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 15 15 extern const struct export_operations nfs_export_ops; 16 16
+11 -11
fs/nfs/super.c
··· 813 813 */ 814 814 seq_printf(m, "\n\topts:\t"); 815 815 seq_puts(m, sb_rdonly(root->d_sb) ? "ro" : "rw"); 816 - seq_puts(m, root->d_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : ""); 817 - seq_puts(m, root->d_sb->s_flags & MS_NOATIME ? ",noatime" : ""); 818 - seq_puts(m, root->d_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); 816 + seq_puts(m, root->d_sb->s_flags & SB_SYNCHRONOUS ? ",sync" : ""); 817 + seq_puts(m, root->d_sb->s_flags & SB_NOATIME ? ",noatime" : ""); 818 + seq_puts(m, root->d_sb->s_flags & SB_NODIRATIME ? ",nodiratime" : ""); 819 819 nfs_show_mount_options(m, nfss, 1); 820 820 821 821 seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); ··· 2296 2296 /* 2297 2297 * noac is a special case. It implies -o sync, but that's not 2298 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 2300 * remount options, so we have to explicitly reset it. 2301 2301 */ 2302 2302 if (data->flags & NFS_MOUNT_NOAC) 2303 - *flags |= MS_SYNCHRONOUS; 2303 + *flags |= SB_SYNCHRONOUS; 2304 2304 2305 2305 /* compare new mount options with old ones */ 2306 2306 error = nfs_compare_remount_data(nfss, data); ··· 2349 2349 /* The VFS shouldn't apply the umask to mode bits. We will do 2350 2350 * so ourselves when necessary. 2351 2351 */ 2352 - sb->s_flags |= MS_POSIXACL; 2352 + sb->s_flags |= SB_POSIXACL; 2353 2353 sb->s_time_gran = 1; 2354 2354 sb->s_export_op = &nfs_export_ops; 2355 2355 } ··· 2379 2379 /* The VFS shouldn't apply the umask to mode bits. We will do 2380 2380 * so ourselves when necessary. 2381 2381 */ 2382 - sb->s_flags |= MS_POSIXACL; 2382 + sb->s_flags |= SB_POSIXACL; 2383 2383 } 2384 2384 2385 2385 nfs_initialise_sb(sb); ··· 2600 2600 2601 2601 /* -o noac implies -o sync */ 2602 2602 if (server->flags & NFS_MOUNT_NOAC) 2603 - sb_mntdata.mntflags |= MS_SYNCHRONOUS; 2603 + sb_mntdata.mntflags |= SB_SYNCHRONOUS; 2604 2604 2605 2605 if (mount_info->cloned != NULL && mount_info->cloned->sb != NULL) 2606 - if (mount_info->cloned->sb->s_flags & MS_SYNCHRONOUS) 2607 - sb_mntdata.mntflags |= MS_SYNCHRONOUS; 2606 + if (mount_info->cloned->sb->s_flags & SB_SYNCHRONOUS) 2607 + sb_mntdata.mntflags |= SB_SYNCHRONOUS; 2608 2608 2609 2609 /* Get a superblock - note that we may end up sharing one that already exists */ 2610 2610 s = sget(nfs_mod->nfs_fs, compare_super, nfs_set_super, flags, &sb_mntdata); ··· 2641 2641 if (error) 2642 2642 goto error_splat_root; 2643 2643 2644 - s->s_flags |= MS_ACTIVE; 2644 + s->s_flags |= SB_ACTIVE; 2645 2645 2646 2646 out: 2647 2647 return mntroot;
+1 -1
fs/nilfs2/segment.c
··· 1979 1979 struct the_nilfs *nilfs) 1980 1980 { 1981 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 1983 int defer_iput = false; 1984 1984 1985 1985 spin_lock(&nilfs->ns_inode_lock);
+12 -12
fs/nilfs2/super.c
··· 141 141 142 142 if (nilfs_test_opt(nilfs, ERRORS_RO)) { 143 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 869 870 870 /* FS independent flags */ 871 871 #ifdef NILFS_ATIME_DISABLE 872 - sb->s_flags |= MS_NOATIME; 872 + sb->s_flags |= SB_NOATIME; 873 873 #endif 874 874 875 875 nilfs_set_default_options(sb, sbp); ··· 1133 1133 err = -EINVAL; 1134 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 1138 err = -EINVAL; 1139 1139 ··· 1143 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 1147 goto out; 1148 - if (*flags & MS_RDONLY) { 1148 + if (*flags & SB_RDONLY) { 1149 1149 /* Shutting down log writer */ 1150 1150 nilfs_detach_log_writer(sb); 1151 - sb->s_flags |= MS_RDONLY; 1151 + sb->s_flags |= SB_RDONLY; 1152 1152 1153 1153 /* 1154 1154 * Remounting a valid RW partition RDONLY, so set ··· 1178 1178 goto restore_opts; 1179 1179 } 1180 1180 1181 - sb->s_flags &= ~MS_RDONLY; 1181 + sb->s_flags &= ~SB_RDONLY; 1182 1182 1183 1183 root = NILFS_I(d_inode(sb->s_root))->i_root; 1184 1184 err = nilfs_attach_log_writer(sb, root); ··· 1212 1212 const char *msg = NULL; 1213 1213 int err; 1214 1214 1215 - if (!(sd->flags & MS_RDONLY)) { 1215 + if (!(sd->flags & SB_RDONLY)) { 1216 1216 msg = "read-only option is not specified"; 1217 1217 goto parse_error; 1218 1218 } ··· 1286 1286 struct dentry *root_dentry; 1287 1287 int err, s_new = false; 1288 1288 1289 - if (!(flags & MS_RDONLY)) 1289 + if (!(flags & SB_RDONLY)) 1290 1290 mode |= FMODE_WRITE; 1291 1291 1292 1292 sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type); ··· 1327 1327 snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev); 1328 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 1331 if (err) 1332 1332 goto failed_super; 1333 1333 1334 - s->s_flags |= MS_ACTIVE; 1334 + s->s_flags |= SB_ACTIVE; 1335 1335 } else if (!sd.cno) { 1336 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 1338 nilfs_msg(s, KERN_ERR, 1339 1339 "the device already has a %s mount.", 1340 1340 sb_rdonly(s) ? "read-only" : "read/write");
+3 -3
fs/nilfs2/the_nilfs.c
··· 220 220 221 221 if (!valid_fs) { 222 222 nilfs_msg(sb, KERN_WARNING, "mounting unchecked fs"); 223 - if (s_flags & MS_RDONLY) { 223 + if (s_flags & SB_RDONLY) { 224 224 nilfs_msg(sb, KERN_INFO, 225 225 "recovery required for readonly filesystem"); 226 226 nilfs_msg(sb, KERN_INFO, ··· 286 286 if (valid_fs) 287 287 goto skip_recovery; 288 288 289 - if (s_flags & MS_RDONLY) { 289 + if (s_flags & SB_RDONLY) { 290 290 __u64 features; 291 291 292 292 if (nilfs_test_opt(nilfs, NORECOVERY)) { ··· 309 309 err = -EROFS; 310 310 goto failed_unload; 311 311 } 312 - sb->s_flags &= ~MS_RDONLY; 312 + sb->s_flags &= ~SB_RDONLY; 313 313 } else if (nilfs_test_opt(nilfs, NORECOVERY)) { 314 314 nilfs_msg(sb, KERN_ERR, 315 315 "recovery cancelled because norecovery option was specified for a read/write mount");
+1 -1
fs/notify/fsnotify.c
··· 67 67 68 68 /* 69 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 71 * evict all inodes with zero i_count from icache which is 72 72 * unnecessarily violent and may in fact be illegal to do. 73 73 */
+1 -1
fs/nsfs.c
··· 255 255 nsfs_mnt = kern_mount(&nsfs); 256 256 if (IS_ERR(nsfs_mnt)) 257 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 }
+16 -16
fs/ntfs/super.c
··· 473 473 474 474 #ifndef NTFS_RW 475 475 /* For read-only compiled driver, enforce read-only flag. */ 476 - *flags |= MS_RDONLY; 476 + *flags |= SB_RDONLY; 477 477 #else /* NTFS_RW */ 478 478 /* 479 479 * For the read-write compiled driver, if we are remounting read-write, ··· 487 487 * When remounting read-only, mark the volume clean if no volume errors 488 488 * have occurred. 489 489 */ 490 - if (sb_rdonly(sb) && !(*flags & MS_RDONLY)) { 490 + if (sb_rdonly(sb) && !(*flags & SB_RDONLY)) { 491 491 static const char *es = ". Cannot remount read-write."; 492 492 493 493 /* Remounting read-write. */ ··· 548 548 NVolSetErrors(vol); 549 549 return -EROFS; 550 550 } 551 - } else if (!sb_rdonly(sb) && (*flags & MS_RDONLY)) { 551 + } else if (!sb_rdonly(sb) && (*flags & SB_RDONLY)) { 552 552 /* Remounting read-only. */ 553 553 if (!NVolErrors(vol)) { 554 554 if (ntfs_clear_volume_flags(vol, VOLUME_IS_DIRTY)) ··· 1799 1799 es3); 1800 1800 goto iput_mirr_err_out; 1801 1801 } 1802 - sb->s_flags |= MS_RDONLY; 1802 + sb->s_flags |= SB_RDONLY; 1803 1803 ntfs_error(sb, "%s. Mounting read-only%s", 1804 1804 !vol->mftmirr_ino ? es1 : es2, es3); 1805 1805 } else ··· 1937 1937 es1, es2); 1938 1938 goto iput_vol_err_out; 1939 1939 } 1940 - sb->s_flags |= MS_RDONLY; 1940 + sb->s_flags |= SB_RDONLY; 1941 1941 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 1942 1942 } else 1943 1943 ntfs_warning(sb, "%s. Will not be able to remount " ··· 1974 1974 } 1975 1975 goto iput_logfile_err_out; 1976 1976 } 1977 - sb->s_flags |= MS_RDONLY; 1977 + sb->s_flags |= SB_RDONLY; 1978 1978 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 1979 1979 } else 1980 1980 ntfs_warning(sb, "%s. Will not be able to remount " ··· 2019 2019 es1, es2); 2020 2020 goto iput_root_err_out; 2021 2021 } 2022 - sb->s_flags |= MS_RDONLY; 2022 + sb->s_flags |= SB_RDONLY; 2023 2023 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2024 2024 } else 2025 2025 ntfs_warning(sb, "%s. Will not be able to remount " ··· 2042 2042 goto iput_root_err_out; 2043 2043 } 2044 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 2047 * Do not set NVolErrors() because ntfs_remount() might manage 2048 2048 * to set the dirty flag in which case all would be well. ··· 2055 2055 * If (still) a read-write mount, set the NT4 compatibility flag on 2056 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 2059 ntfs_set_volume_flags(vol, VOLUME_MOUNTED_ON_NT4)) { 2060 2060 static const char *es1 = "Failed to set NT4 compatibility flag"; 2061 2061 static const char *es2 = ". Run chkdsk."; ··· 2069 2069 goto iput_root_err_out; 2070 2070 } 2071 2071 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2072 - sb->s_flags |= MS_RDONLY; 2072 + sb->s_flags |= SB_RDONLY; 2073 2073 NVolSetErrors(vol); 2074 2074 } 2075 2075 #endif ··· 2087 2087 goto iput_root_err_out; 2088 2088 } 2089 2089 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2090 - sb->s_flags |= MS_RDONLY; 2090 + sb->s_flags |= SB_RDONLY; 2091 2091 NVolSetErrors(vol); 2092 2092 } 2093 2093 #endif /* NTFS_RW */ ··· 2128 2128 es1, es2); 2129 2129 goto iput_quota_err_out; 2130 2130 } 2131 - sb->s_flags |= MS_RDONLY; 2131 + sb->s_flags |= SB_RDONLY; 2132 2132 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2133 2133 } else 2134 2134 ntfs_warning(sb, "%s. Will not be able to remount " ··· 2150 2150 goto iput_quota_err_out; 2151 2151 } 2152 2152 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2153 - sb->s_flags |= MS_RDONLY; 2153 + sb->s_flags |= SB_RDONLY; 2154 2154 NVolSetErrors(vol); 2155 2155 } 2156 2156 /* ··· 2171 2171 es1, es2); 2172 2172 goto iput_usnjrnl_err_out; 2173 2173 } 2174 - sb->s_flags |= MS_RDONLY; 2174 + sb->s_flags |= SB_RDONLY; 2175 2175 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2176 2176 } else 2177 2177 ntfs_warning(sb, "%s. Will not be able to remount " ··· 2194 2194 goto iput_usnjrnl_err_out; 2195 2195 } 2196 2196 ntfs_error(sb, "%s. Mounting read-only%s", es1, es2); 2197 - sb->s_flags |= MS_RDONLY; 2197 + sb->s_flags |= SB_RDONLY; 2198 2198 NVolSetErrors(vol); 2199 2199 } 2200 2200 #endif /* NTFS_RW */ ··· 2728 2728 lockdep_off(); 2729 2729 ntfs_debug("Entering."); 2730 2730 #ifndef NTFS_RW 2731 - sb->s_flags |= MS_RDONLY; 2731 + sb->s_flags |= SB_RDONLY; 2732 2732 #endif /* ! NTFS_RW */ 2733 2733 /* Allocate a new ntfs_volume and place it in sb->s_fs_info. */ 2734 2734 sb->s_fs_info = kmalloc(sizeof(ntfs_volume), GFP_NOFS);
+1 -1
fs/ocfs2/file.c
··· 227 227 return 0; 228 228 229 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 231 return 0; 232 232 233 233 /*
+14 -14
fs/ocfs2/super.c
··· 675 675 } 676 676 677 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 679 /* Disable quota accounting before remounting RO */ 680 - if (*flags & MS_RDONLY) { 680 + if (*flags & SB_RDONLY) { 681 681 ret = ocfs2_susp_quotas(osb, 0); 682 682 if (ret < 0) 683 683 goto out; ··· 691 691 goto unlock_osb; 692 692 } 693 693 694 - if (*flags & MS_RDONLY) { 695 - sb->s_flags |= MS_RDONLY; 694 + if (*flags & SB_RDONLY) { 695 + sb->s_flags |= SB_RDONLY; 696 696 osb->osb_flags |= OCFS2_OSB_SOFT_RO; 697 697 } else { 698 698 if (osb->osb_flags & OCFS2_OSB_ERROR_FS) { ··· 709 709 ret = -EINVAL; 710 710 goto unlock_osb; 711 711 } 712 - sb->s_flags &= ~MS_RDONLY; 712 + sb->s_flags &= ~SB_RDONLY; 713 713 osb->osb_flags &= ~OCFS2_OSB_SOFT_RO; 714 714 } 715 715 trace_ocfs2_remount(sb->s_flags, osb->osb_flags, *flags); 716 716 unlock_osb: 717 717 spin_unlock(&osb->osb_lock); 718 718 /* Enable quota accounting after remounting RW */ 719 - if (!ret && !(*flags & MS_RDONLY)) { 719 + if (!ret && !(*flags & SB_RDONLY)) { 720 720 if (sb_any_quota_suspended(sb)) 721 721 ret = ocfs2_susp_quotas(osb, 1); 722 722 else ··· 724 724 if (ret < 0) { 725 725 /* Return back changes... */ 726 726 spin_lock(&osb->osb_lock); 727 - sb->s_flags |= MS_RDONLY; 727 + sb->s_flags |= SB_RDONLY; 728 728 osb->osb_flags |= OCFS2_OSB_SOFT_RO; 729 729 spin_unlock(&osb->osb_lock); 730 730 goto out; ··· 744 744 if (!ocfs2_is_hard_readonly(osb)) 745 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 748 ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? 749 - MS_POSIXACL : 0); 749 + SB_POSIXACL : 0); 750 750 } 751 751 out: 752 752 return ret; ··· 1057 1057 1058 1058 sb->s_magic = OCFS2_SUPER_MAGIC; 1059 1059 1060 - sb->s_flags = (sb->s_flags & ~(MS_POSIXACL | MS_NOSEC)) | 1061 - ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); 1060 + sb->s_flags = (sb->s_flags & ~(SB_POSIXACL | SB_NOSEC)) | 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 1064 * heartbeat=none */ 1065 1065 if (bdev_read_only(sb->s_bdev)) { 1066 1066 if (!sb_rdonly(sb)) { ··· 2057 2057 sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP; 2058 2058 sb->s_xattr = ocfs2_xattr_handlers; 2059 2059 sb->s_time_gran = 1; 2060 - sb->s_flags |= MS_NOATIME; 2060 + sb->s_flags |= SB_NOATIME; 2061 2061 /* this is needed to support O_LARGEFILE */ 2062 2062 cbits = le32_to_cpu(di->id2.i_super.s_clustersize_bits); 2063 2063 bbits = le32_to_cpu(di->id2.i_super.s_blocksize_bits); ··· 2568 2568 return rv; 2569 2569 2570 2570 pr_crit("OCFS2: File system is now read-only.\n"); 2571 - sb->s_flags |= MS_RDONLY; 2571 + sb->s_flags |= SB_RDONLY; 2572 2572 ocfs2_set_ro_flag(osb, 0); 2573 2573 } 2574 2574
+1 -1
fs/ocfs2/xattr.c
··· 901 901 902 902 case OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS: 903 903 case OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT: 904 - if (!(sb->s_flags & MS_POSIXACL)) 904 + if (!(sb->s_flags & SB_POSIXACL)) 905 905 return 0; 906 906 break; 907 907
+2 -2
fs/openpromfs/inode.c
··· 369 369 static int openprom_remount(struct super_block *sb, int *flags, char *data) 370 370 { 371 371 sync_filesystem(sb); 372 - *flags |= MS_NOATIME; 372 + *flags |= SB_NOATIME; 373 373 return 0; 374 374 } 375 375 ··· 386 386 struct op_inode_info *oi; 387 387 int ret; 388 388 389 - s->s_flags |= MS_NOATIME; 389 + s->s_flags |= SB_NOATIME; 390 390 s->s_blocksize = 1024; 391 391 s->s_blocksize_bits = 10; 392 392 s->s_magic = OPENPROM_SUPER_MAGIC;
+4 -4
fs/orangefs/super.c
··· 40 40 { 41 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 44 seq_puts(m, ",acl"); 45 45 if (orangefs_sb->flags & ORANGEFS_OPT_INTR) 46 46 seq_puts(m, ",intr"); ··· 60 60 * Force any potential flags that might be set from the mount 61 61 * to zero, ie, initialize to unset. 62 62 */ 63 - sb->s_flags &= ~MS_POSIXACL; 63 + sb->s_flags &= ~SB_POSIXACL; 64 64 orangefs_sb->flags &= ~ORANGEFS_OPT_INTR; 65 65 orangefs_sb->flags &= ~ORANGEFS_OPT_LOCAL_LOCK; 66 66 ··· 73 73 token = match_token(p, tokens, args); 74 74 switch (token) { 75 75 case Opt_acl: 76 - sb->s_flags |= MS_POSIXACL; 76 + sb->s_flags |= SB_POSIXACL; 77 77 break; 78 78 case Opt_intr: 79 79 orangefs_sb->flags |= ORANGEFS_OPT_INTR; ··· 507 507 508 508 ret = orangefs_fill_sb(sb, 509 509 &new_op->downcall.resp.fs_mount, data, 510 - flags & MS_SILENT ? 1 : 0); 510 + flags & SB_SILENT ? 1 : 0); 511 511 512 512 if (ret) { 513 513 d = ERR_PTR(ret);
+5 -5
fs/overlayfs/super.c
··· 326 326 { 327 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 330 return -EROFS; 331 331 332 332 return 0; ··· 1190 1190 goto out_err; 1191 1191 1192 1192 if (!ofs->workdir) 1193 - sb->s_flags |= MS_RDONLY; 1193 + sb->s_flags |= SB_RDONLY; 1194 1194 1195 1195 sb->s_stack_depth = ofs->upper_mnt->mnt_sb->s_stack_depth; 1196 1196 sb->s_time_gran = ofs->upper_mnt->mnt_sb->s_time_gran; ··· 1203 1203 1204 1204 /* If the upper fs is nonexistent, we mark overlayfs r/o too */ 1205 1205 if (!ofs->upper_mnt) 1206 - sb->s_flags |= MS_RDONLY; 1206 + sb->s_flags |= SB_RDONLY; 1207 1207 else if (ofs->upper_mnt->mnt_sb != ofs->same_sb) 1208 1208 ofs->same_sb = NULL; 1209 1209 ··· 1213 1213 goto out_free_oe; 1214 1214 1215 1215 if (!ofs->indexdir) 1216 - sb->s_flags |= MS_RDONLY; 1216 + sb->s_flags |= SB_RDONLY; 1217 1217 } 1218 1218 1219 1219 /* Show index=off/on in /proc/mounts for any of the reasons above */ ··· 1227 1227 sb->s_op = &ovl_super_operations; 1228 1228 sb->s_xattr = ovl_xattr_handlers; 1229 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 1232 err = -ENOMEM; 1233 1233 root_dentry = d_make_root(ovl_new_inode(sb, S_IFDIR, 0));
+1 -1
fs/proc/inode.c
··· 483 483 484 484 /* User space would break if executables or devices appear on proc */ 485 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 487 s->s_blocksize = 1024; 488 488 s->s_blocksize_bits = 10; 489 489 s->s_magic = PROC_SUPER_MAGIC;
+1 -1
fs/proc/root.c
··· 91 91 { 92 92 struct pid_namespace *ns; 93 93 94 - if (flags & MS_KERNMOUNT) { 94 + if (flags & SB_KERNMOUNT) { 95 95 ns = data; 96 96 data = NULL; 97 97 } else {
+4 -4
fs/proc_namespace.c
··· 45 45 static int show_sb_opts(struct seq_file *m, struct super_block *sb) 46 46 { 47 47 static const struct proc_fs_info fs_info[] = { 48 - { MS_SYNCHRONOUS, ",sync" }, 49 - { MS_DIRSYNC, ",dirsync" }, 50 - { MS_MANDLOCK, ",mand" }, 51 - { MS_LAZYTIME, ",lazytime" }, 48 + { SB_SYNCHRONOUS, ",sync" }, 49 + { SB_DIRSYNC, ",dirsync" }, 50 + { SB_MANDLOCK, ",mand" }, 51 + { SB_LAZYTIME, ",lazytime" }, 52 52 { 0, NULL } 53 53 }; 54 54 const struct proc_fs_info *fs_infop;
+2 -2
fs/qnx4/inode.c
··· 47 47 sync_filesystem(sb); 48 48 qs = qnx4_sb(sb); 49 49 qs->Version = QNX4_VERSION; 50 - *flags |= MS_RDONLY; 50 + *flags |= SB_RDONLY; 51 51 return 0; 52 52 } 53 53 ··· 199 199 200 200 s->s_op = &qnx4_sops; 201 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 204 /* Check the superblock signature. Since the qnx4 code is 205 205 dangerous, we should leave as quickly as possible
+2 -2
fs/qnx6/inode.c
··· 56 56 static int qnx6_remount(struct super_block *sb, int *flags, char *data) 57 57 { 58 58 sync_filesystem(sb); 59 - *flags |= MS_RDONLY; 59 + *flags |= SB_RDONLY; 60 60 return 0; 61 61 } 62 62 ··· 427 427 } 428 428 s->s_op = &qnx6_sops; 429 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 432 /* ease the later tree level calculations */ 433 433 sbi = QNX6_SB(s);
+1 -1
fs/reiserfs/inode.c
··· 2106 2106 journal_end(th); 2107 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 2110 reiserfs_warning(inode->i_sb, "jdm-13090", 2111 2111 "ACLs aren't enabled in the fs, " 2112 2112 "but vfs thinks they are!");
+3 -3
fs/reiserfs/journal.c
··· 1960 1960 /* 1961 1961 * Cancel flushing of old commits. Note that neither of these works 1962 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 1965 reiserfs_cancel_old_flush(sb); 1966 1966 /* wait for all commits to finish */ ··· 4302 4302 * Avoid queueing work when sb is being shut down. Transaction 4303 4303 * will be flushed on journal shutdown. 4304 4304 */ 4305 - if (sb->s_flags & MS_ACTIVE) 4305 + if (sb->s_flags & SB_ACTIVE) 4306 4306 queue_delayed_work(REISERFS_SB(sb)->commit_wq, 4307 4307 &journal->j_work, HZ / 10); 4308 4308 } ··· 4393 4393 if (!journal->j_errno) 4394 4394 journal->j_errno = errno; 4395 4395 4396 - sb->s_flags |= MS_RDONLY; 4396 + sb->s_flags |= SB_RDONLY; 4397 4397 set_bit(J_ABORTED, &journal->j_state); 4398 4398 4399 4399 #ifdef CONFIG_REISERFS_CHECK
+2 -2
fs/reiserfs/prints.c
··· 390 390 return; 391 391 392 392 reiserfs_info(sb, "Remounting filesystem read-only\n"); 393 - sb->s_flags |= MS_RDONLY; 393 + sb->s_flags |= SB_RDONLY; 394 394 reiserfs_abort_journal(sb, -EIO); 395 395 } 396 396 ··· 409 409 printk(KERN_CRIT "REISERFS abort (device %s): %s\n", sb->s_id, 410 410 error_buf); 411 411 412 - sb->s_flags |= MS_RDONLY; 412 + sb->s_flags |= SB_RDONLY; 413 413 reiserfs_abort_journal(sb, errno); 414 414 } 415 415
+9 -9
fs/reiserfs/super.c
··· 121 121 * Avoid scheduling flush when sb is being shut down. It can race 122 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 125 return; 126 126 127 127 spin_lock(&sbi->old_work_lock); ··· 252 252 253 253 #ifdef CONFIG_QUOTA 254 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 256 ms_active_set = 0; 257 257 } else { 258 258 ms_active_set = 1; 259 - s->s_flags |= MS_ACTIVE; 259 + s->s_flags |= SB_ACTIVE; 260 260 } 261 261 /* Turn on quotas so that they are updated correctly */ 262 262 for (i = 0; i < REISERFS_MAXQUOTAS; i++) { ··· 411 411 reiserfs_write_lock(s); 412 412 if (ms_active_set) 413 413 /* Restore the flag back */ 414 - s->s_flags &= ~MS_ACTIVE; 414 + s->s_flags &= ~SB_ACTIVE; 415 415 #endif 416 416 pathrelse(&path); 417 417 if (done) ··· 1521 1521 goto out_err_unlock; 1522 1522 } 1523 1523 1524 - if (*mount_flags & MS_RDONLY) { 1524 + if (*mount_flags & SB_RDONLY) { 1525 1525 reiserfs_write_unlock(s); 1526 1526 reiserfs_xattr_init(s, *mount_flags); 1527 1527 /* remount read-only */ ··· 1567 1567 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); 1568 1568 1569 1569 /* now it is safe to call journal_begin */ 1570 - s->s_flags &= ~MS_RDONLY; 1570 + s->s_flags &= ~SB_RDONLY; 1571 1571 err = journal_begin(&th, s, 10); 1572 1572 if (err) 1573 1573 goto out_err_unlock; ··· 1575 1575 /* Mount a partition which is read-only, read-write */ 1576 1576 reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1); 1577 1577 REISERFS_SB(s)->s_mount_state = sb_umount_state(rs); 1578 - s->s_flags &= ~MS_RDONLY; 1578 + s->s_flags &= ~SB_RDONLY; 1579 1579 set_sb_umount_state(rs, REISERFS_ERROR_FS); 1580 1580 if (!old_format_only(s)) 1581 1581 set_sb_mnt_count(rs, sb_mnt_count(rs) + 1); ··· 1590 1590 goto out_err_unlock; 1591 1591 1592 1592 reiserfs_write_unlock(s); 1593 - if (!(*mount_flags & MS_RDONLY)) { 1593 + if (!(*mount_flags & SB_RDONLY)) { 1594 1594 dquot_resume(s, -1); 1595 1595 reiserfs_write_lock(s); 1596 1596 finish_unfinished(s); ··· 2055 2055 if (bdev_read_only(s->s_bdev) && !sb_rdonly(s)) { 2056 2056 SWARN(silent, s, "clm-7000", 2057 2057 "Detected readonly device, marking FS readonly"); 2058 - s->s_flags |= MS_RDONLY; 2058 + s->s_flags |= SB_RDONLY; 2059 2059 } 2060 2060 args.objectid = REISERFS_ROOT_OBJECTID; 2061 2061 args.dirid = REISERFS_ROOT_PARENT_OBJECTID;
+5 -5
fs/reiserfs/xattr.c
··· 959 959 960 960 /* 961 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 963 * mount_flags != mount_options 964 964 */ 965 965 int reiserfs_xattr_init(struct super_block *s, int mount_flags) ··· 971 971 if (err) 972 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 975 inode_lock(d_inode(s->s_root)); 976 976 err = create_privroot(REISERFS_SB(s)->priv_root); 977 977 inode_unlock(d_inode(s->s_root)); ··· 999 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 1003 if (reiserfs_posixacl(s)) 1004 - s->s_flags |= MS_POSIXACL; 1004 + s->s_flags |= SB_POSIXACL; 1005 1005 else 1006 - s->s_flags &= ~MS_POSIXACL; 1006 + s->s_flags &= ~SB_POSIXACL; 1007 1007 1008 1008 return err; 1009 1009 }
+2 -2
fs/romfs/super.c
··· 451 451 static int romfs_remount(struct super_block *sb, int *flags, char *data) 452 452 { 453 453 sync_filesystem(sb); 454 - *flags |= MS_RDONLY; 454 + *flags |= SB_RDONLY; 455 455 return 0; 456 456 } 457 457 ··· 502 502 503 503 sb->s_maxbytes = 0xFFFFFFFF; 504 504 sb->s_magic = ROMFS_MAGIC; 505 - sb->s_flags |= MS_RDONLY | MS_NOATIME; 505 + sb->s_flags |= SB_RDONLY | SB_NOATIME; 506 506 sb->s_op = &romfs_super_ops; 507 507 508 508 #ifdef CONFIG_ROMFS_ON_MTD
+2 -2
fs/squashfs/super.c
··· 195 195 (u64) le64_to_cpu(sblk->id_table_start)); 196 196 197 197 sb->s_maxbytes = MAX_LFS_FILESIZE; 198 - sb->s_flags |= MS_RDONLY; 198 + sb->s_flags |= SB_RDONLY; 199 199 sb->s_op = &squashfs_super_ops; 200 200 201 201 err = -ENOMEM; ··· 373 373 static int squashfs_remount(struct super_block *sb, int *flags, char *data) 374 374 { 375 375 sync_filesystem(sb); 376 - *flags |= MS_RDONLY; 376 + *flags |= SB_RDONLY; 377 377 return 0; 378 378 } 379 379
+3 -3
fs/statfs.c
··· 35 35 static int flags_by_sb(int s_flags) 36 36 { 37 37 int flags = 0; 38 - if (s_flags & MS_SYNCHRONOUS) 38 + if (s_flags & SB_SYNCHRONOUS) 39 39 flags |= ST_SYNCHRONOUS; 40 - if (s_flags & MS_MANDLOCK) 40 + if (s_flags & SB_MANDLOCK) 41 41 flags |= ST_MANDLOCK; 42 - if (s_flags & MS_RDONLY) 42 + if (s_flags & SB_RDONLY) 43 43 flags |= ST_RDONLY; 44 44 return flags; 45 45 }
+1 -1
fs/sysfs/mount.c
··· 30 30 void *ns; 31 31 bool new_sb; 32 32 33 - if (!(flags & MS_KERNMOUNT)) { 33 + if (!(flags & SB_KERNMOUNT)) { 34 34 if (!kobj_ns_current_may_mount(KOBJ_NS_TYPE_NET)) 35 35 return ERR_PTR(-EPERM); 36 36 }
+1 -1
fs/sysv/inode.c
··· 63 63 64 64 sync_filesystem(sb); 65 65 if (sbi->s_forced_ro) 66 - *flags |= MS_RDONLY; 66 + *flags |= SB_RDONLY; 67 67 return 0; 68 68 } 69 69
+1 -1
fs/sysv/super.c
··· 333 333 /* set up enough so that it can read an inode */ 334 334 sb->s_op = &sysv_sops; 335 335 if (sbi->s_forced_ro) 336 - sb->s_flags |= MS_RDONLY; 336 + sb->s_flags |= SB_RDONLY; 337 337 if (sbi->s_truncate) 338 338 sb->s_d_op = &sysv_dentry_operations; 339 339 root_inode = sysv_iget(sb, SYSV_ROOT_INO);
+1 -1
fs/ubifs/file.c
··· 1406 1406 if (flags & S_MTIME) 1407 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 1410 iflags |= I_DIRTY_SYNC; 1411 1411 1412 1412 release = ui->dirty;
+1 -1
fs/ubifs/io.c
··· 84 84 if (!c->ro_error) { 85 85 c->ro_error = 1; 86 86 c->no_chk_data_crc = 0; 87 - c->vfs_sb->s_flags |= MS_RDONLY; 87 + c->vfs_sb->s_flags |= SB_RDONLY; 88 88 ubifs_warn(c, "switched to read-only mode, error %d", err); 89 89 dump_stack(); 90 90 }
+10 -10
fs/ubifs/super.c
··· 968 968 969 969 pr_notice("UBIFS: parse %s\n", option); 970 970 if (!strcmp(option, "sync")) 971 - return MS_SYNCHRONOUS; 971 + return SB_SYNCHRONOUS; 972 972 return 0; 973 973 } 974 974 ··· 1160 1160 size_t sz; 1161 1161 1162 1162 c->ro_mount = !!sb_rdonly(c->vfs_sb); 1163 - /* Suppress error messages while probing if MS_SILENT is set */ 1164 - c->probing = !!(c->vfs_sb->s_flags & MS_SILENT); 1163 + /* Suppress error messages while probing if SB_SILENT is set */ 1164 + c->probing = !!(c->vfs_sb->s_flags & SB_SILENT); 1165 1165 1166 1166 err = init_constants_early(c); 1167 1167 if (err) ··· 1852 1852 return err; 1853 1853 } 1854 1854 1855 - if (c->ro_mount && !(*flags & MS_RDONLY)) { 1855 + if (c->ro_mount && !(*flags & SB_RDONLY)) { 1856 1856 if (c->ro_error) { 1857 1857 ubifs_msg(c, "cannot re-mount R/W due to prior errors"); 1858 1858 return -EROFS; ··· 1864 1864 err = ubifs_remount_rw(c); 1865 1865 if (err) 1866 1866 return err; 1867 - } else if (!c->ro_mount && (*flags & MS_RDONLY)) { 1867 + } else if (!c->ro_mount && (*flags & SB_RDONLY)) { 1868 1868 if (c->ro_error) { 1869 1869 ubifs_msg(c, "cannot re-mount R/O due to prior errors"); 1870 1870 return -EROFS; ··· 2117 2117 */ 2118 2118 ubi = open_ubi(name, UBI_READONLY); 2119 2119 if (IS_ERR(ubi)) { 2120 - if (!(flags & MS_SILENT)) 2120 + if (!(flags & SB_SILENT)) 2121 2121 pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d", 2122 2122 current->pid, name, (int)PTR_ERR(ubi)); 2123 2123 return ERR_CAST(ubi); ··· 2143 2143 kfree(c); 2144 2144 /* A new mount point for already mounted UBIFS */ 2145 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 2147 err = -EBUSY; 2148 2148 goto out_deact; 2149 2149 } 2150 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 2152 if (err) 2153 2153 goto out_deact; 2154 2154 /* We do not support atime */ 2155 - sb->s_flags |= MS_ACTIVE; 2155 + sb->s_flags |= SB_ACTIVE; 2156 2156 #ifndef CONFIG_UBIFS_ATIME_SUPPORT 2157 - sb->s_flags |= MS_NOATIME; 2157 + sb->s_flags |= SB_NOATIME; 2158 2158 #else 2159 2159 ubifs_msg(c, "full atime support is enabled."); 2160 2160 #endif
+2 -2
fs/ubifs/ubifs.h
··· 1201 1201 * @need_recovery: %1 if the file-system needs recovery 1202 1202 * @replaying: %1 during journal replay 1203 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 1205 * @remounting_rw: %1 while re-mounting from R/O mode to R/W mode 1206 1206 * @replay_list: temporary list used during journal replay 1207 1207 * @replay_buds: list of buds to replay ··· 1850 1850 void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...); 1851 1851 /* 1852 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 1855 #define ubifs_errc(c, fmt, ...) \ 1856 1856 do { \
+3 -3
fs/udf/super.c
··· 650 650 sync_filesystem(sb); 651 651 if (lvidiu) { 652 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 654 return -EACCES; 655 655 } 656 656 ··· 673 673 sbi->s_dmode = uopt.dmode; 674 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 677 goto out_unlock; 678 678 679 - if (*flags & MS_RDONLY) 679 + if (*flags & SB_RDONLY) 680 680 udf_close_lvid(sb); 681 681 else 682 682 udf_open_lvid(sb);
+4 -4
fs/ufs/balloc.c
··· 115 115 116 116 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 117 117 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 118 - if (sb->s_flags & MS_SYNCHRONOUS) 118 + if (sb->s_flags & SB_SYNCHRONOUS) 119 119 ubh_sync_block(UCPI_UBH(ucpi)); 120 120 ufs_mark_sb_dirty(sb); 121 121 ··· 205 205 206 206 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 207 207 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 208 - if (sb->s_flags & MS_SYNCHRONOUS) 208 + if (sb->s_flags & SB_SYNCHRONOUS) 209 209 ubh_sync_block(UCPI_UBH(ucpi)); 210 210 211 211 if (overflow) { ··· 567 567 568 568 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 569 569 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 570 - if (sb->s_flags & MS_SYNCHRONOUS) 570 + if (sb->s_flags & SB_SYNCHRONOUS) 571 571 ubh_sync_block(UCPI_UBH(ucpi)); 572 572 ufs_mark_sb_dirty(sb); 573 573 ··· 688 688 succed: 689 689 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 690 690 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 691 - if (sb->s_flags & MS_SYNCHRONOUS) 691 + if (sb->s_flags & SB_SYNCHRONOUS) 692 692 ubh_sync_block(UCPI_UBH(ucpi)); 693 693 ufs_mark_sb_dirty(sb); 694 694
+5 -5
fs/ufs/ialloc.c
··· 112 112 113 113 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 114 114 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 115 - if (sb->s_flags & MS_SYNCHRONOUS) 115 + if (sb->s_flags & SB_SYNCHRONOUS) 116 116 ubh_sync_block(UCPI_UBH(ucpi)); 117 117 118 118 ufs_mark_sb_dirty(sb); ··· 146 146 set_buffer_uptodate(bh); 147 147 mark_buffer_dirty(bh); 148 148 unlock_buffer(bh); 149 - if (sb->s_flags & MS_SYNCHRONOUS) 149 + if (sb->s_flags & SB_SYNCHRONOUS) 150 150 sync_dirty_buffer(bh); 151 151 brelse(bh); 152 152 } 153 153 154 154 fs32_add(sb, &ucg->cg_u.cg_u2.cg_initediblk, uspi->s_inopb); 155 155 ubh_mark_buffer_dirty(UCPI_UBH(ucpi)); 156 - if (sb->s_flags & MS_SYNCHRONOUS) 156 + if (sb->s_flags & SB_SYNCHRONOUS) 157 157 ubh_sync_block(UCPI_UBH(ucpi)); 158 158 159 159 UFSD("EXIT\n"); ··· 284 284 } 285 285 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 286 286 ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); 287 - if (sb->s_flags & MS_SYNCHRONOUS) 287 + if (sb->s_flags & SB_SYNCHRONOUS) 288 288 ubh_sync_block(UCPI_UBH(ucpi)); 289 289 ufs_mark_sb_dirty(sb); 290 290 ··· 330 330 ufs2_inode->ui_birthnsec = cpu_to_fs32(sb, ts.tv_nsec); 331 331 mark_buffer_dirty(bh); 332 332 unlock_buffer(bh); 333 - if (sb->s_flags & MS_SYNCHRONOUS) 333 + if (sb->s_flags & SB_SYNCHRONOUS) 334 334 sync_dirty_buffer(bh); 335 335 brelse(bh); 336 336 }
+15 -15
fs/ufs/super.c
··· 282 282 usb1->fs_clean = UFS_FSBAD; 283 283 ubh_mark_buffer_dirty(USPI_UBH(uspi)); 284 284 ufs_mark_sb_dirty(sb); 285 - sb->s_flags |= MS_RDONLY; 285 + sb->s_flags |= SB_RDONLY; 286 286 } 287 287 va_start(args, fmt); 288 288 vaf.fmt = fmt; ··· 320 320 va_start(args, fmt); 321 321 vaf.fmt = fmt; 322 322 vaf.va = &args; 323 - sb->s_flags |= MS_RDONLY; 323 + sb->s_flags |= SB_RDONLY; 324 324 pr_crit("panic (device %s): %s: %pV\n", 325 325 sb->s_id, function, &vaf); 326 326 va_end(args); ··· 905 905 if (!sb_rdonly(sb)) { 906 906 if (!silent) 907 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 910 break; 911 911 ··· 921 921 if (!sb_rdonly(sb)) { 922 922 if (!silent) 923 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 926 break; 927 927 ··· 937 937 if (!sb_rdonly(sb)) { 938 938 if (!silent) 939 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 942 break; 943 943 ··· 953 953 if (!sb_rdonly(sb)) { 954 954 if (!silent) 955 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 958 break; 959 959 ··· 968 968 if (!sb_rdonly(sb)) { 969 969 if (!silent) 970 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 973 break; 974 974 default: ··· 1125 1125 break; 1126 1126 case UFS_FSACTIVE: 1127 1127 pr_err("%s(): fs is active\n", __func__); 1128 - sb->s_flags |= MS_RDONLY; 1128 + sb->s_flags |= SB_RDONLY; 1129 1129 break; 1130 1130 case UFS_FSBAD: 1131 1131 pr_err("%s(): fs is bad\n", __func__); 1132 - sb->s_flags |= MS_RDONLY; 1132 + sb->s_flags |= SB_RDONLY; 1133 1133 break; 1134 1134 default: 1135 1135 pr_err("%s(): can't grok fs_clean 0x%x\n", 1136 1136 __func__, usb1->fs_clean); 1137 - sb->s_flags |= MS_RDONLY; 1137 + sb->s_flags |= SB_RDONLY; 1138 1138 break; 1139 1139 } 1140 1140 } else { 1141 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 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 1332 UFS_SB(sb)->s_mount_opt = new_mount_opt; 1333 1333 mutex_unlock(&UFS_SB(sb)->s_lock); 1334 1334 return 0; ··· 1337 1337 /* 1338 1338 * fs was mouted as rw, remounting ro 1339 1339 */ 1340 - if (*mount_flags & MS_RDONLY) { 1340 + if (*mount_flags & SB_RDONLY) { 1341 1341 ufs_put_super_internal(sb); 1342 1342 usb1->fs_time = cpu_to_fs32(sb, get_seconds()); 1343 1343 if ((flags & UFS_ST_MASK) == UFS_ST_SUN ··· 1346 1346 ufs_set_fs_state(sb, usb1, usb3, 1347 1347 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); 1348 1348 ubh_mark_buffer_dirty (USPI_UBH(uspi)); 1349 - sb->s_flags |= MS_RDONLY; 1349 + sb->s_flags |= SB_RDONLY; 1350 1350 } else { 1351 1351 /* 1352 1352 * fs was mounted as ro, remounting rw ··· 1370 1370 mutex_unlock(&UFS_SB(sb)->s_lock); 1371 1371 return -EPERM; 1372 1372 } 1373 - sb->s_flags &= ~MS_RDONLY; 1373 + sb->s_flags &= ~SB_RDONLY; 1374 1374 #endif 1375 1375 } 1376 1376 UFS_SB(sb)->s_mount_opt = new_mount_opt;
+3 -3
fs/xfs/xfs_log.c
··· 781 781 * something to an unlinked inode, the irele won't cause 782 782 * premature truncation and freeing of the inode, which results 783 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 785 * otherwise clean up the lru if there's a subsequent failure in 786 786 * xfs_mountfs, which leads to us leaking the inodes if nothing 787 787 * else (e.g. quotacheck) references the inodes before the 788 788 * mount failure occurs. 789 789 */ 790 - mp->m_super->s_flags |= MS_ACTIVE; 790 + mp->m_super->s_flags |= SB_ACTIVE; 791 791 error = xlog_recover_finish(mp->m_log); 792 792 if (!error) 793 793 xfs_log_work_queue(mp); 794 - mp->m_super->s_flags &= ~MS_ACTIVE; 794 + mp->m_super->s_flags &= ~SB_ACTIVE; 795 795 evict_inodes(mp->m_super); 796 796 797 797 /*
+4 -4
fs/xfs/xfs_super.c
··· 212 212 */ 213 213 if (sb_rdonly(sb)) 214 214 mp->m_flags |= XFS_MOUNT_RDONLY; 215 - if (sb->s_flags & MS_DIRSYNC) 215 + if (sb->s_flags & SB_DIRSYNC) 216 216 mp->m_flags |= XFS_MOUNT_DIRSYNC; 217 - if (sb->s_flags & MS_SYNCHRONOUS) 217 + if (sb->s_flags & SB_SYNCHRONOUS) 218 218 mp->m_flags |= XFS_MOUNT_WSYNC; 219 219 220 220 /* ··· 1312 1312 } 1313 1313 1314 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 1316 if (mp->m_flags & XFS_MOUNT_NORECOVERY) { 1317 1317 xfs_warn(mp, 1318 1318 "ro->rw transition prohibited on norecovery mount"); ··· 1368 1368 } 1369 1369 1370 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 1372 /* Free the per-AG metadata reservation pool. */ 1373 1373 error = xfs_fs_unreserve_ag_blocks(mp); 1374 1374 if (error) {
+1 -1
fs/xfs/xfs_super.h
··· 30 30 31 31 #ifdef CONFIG_XFS_POSIX_ACL 32 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 34 #else 35 35 # define XFS_ACL_STRING 36 36 # define set_posix_acl_flag(sb) do { } while (0)
+1 -1
include/linux/fs.h
··· 1872 1872 */ 1873 1873 #define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg)) 1874 1874 1875 - static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & MS_RDONLY; } 1875 + static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & SB_RDONLY; } 1876 1876 #define IS_RDONLY(inode) sb_rdonly((inode)->i_sb) 1877 1877 #define IS_SYNC(inode) (__IS_FLG(inode, SB_SYNCHRONOUS) || \ 1878 1878 ((inode)->i_flags & S_SYNC))
+1 -1
include/uapi/linux/bfs_fs.h
··· 76 76 #define BFS_FILEBLOCKS(ip) \ 77 77 ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock)) 78 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 82 #endif /* _LINUX_BFS_FS_H */
+1 -1
ipc/mqueue.c
··· 331 331 void *data) 332 332 { 333 333 struct ipc_namespace *ns; 334 - if (flags & MS_KERNMOUNT) { 334 + if (flags & SB_KERNMOUNT) { 335 335 ns = data; 336 336 data = NULL; 337 337 } else {
+5 -5
mm/shmem.c
··· 3776 3776 * tmpfs instance, limiting inodes to one per page of lowmem; 3777 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 3780 sbinfo->max_blocks = shmem_default_max_blocks(); 3781 3781 sbinfo->max_inodes = shmem_default_max_inodes(); 3782 3782 if (shmem_parse_options(data, sbinfo, false)) { ··· 3784 3784 goto failed; 3785 3785 } 3786 3786 } else { 3787 - sb->s_flags |= MS_NOUSER; 3787 + sb->s_flags |= SB_NOUSER; 3788 3788 } 3789 3789 sb->s_export_op = &shmem_export_ops; 3790 - sb->s_flags |= MS_NOSEC; 3790 + sb->s_flags |= SB_NOSEC; 3791 3791 #else 3792 - sb->s_flags |= MS_NOUSER; 3792 + sb->s_flags |= SB_NOUSER; 3793 3793 #endif 3794 3794 3795 3795 spin_lock_init(&sbinfo->stat_lock); ··· 3809 3809 sb->s_xattr = shmem_xattr_handlers; 3810 3810 #endif 3811 3811 #ifdef CONFIG_TMPFS_POSIX_ACL 3812 - sb->s_flags |= MS_POSIXACL; 3812 + sb->s_flags |= SB_POSIXACL; 3813 3813 #endif 3814 3814 uuid_gen(&sb->s_uuid); 3815 3815
+1 -1
security/apparmor/apparmorfs.c
··· 2451 2451 aafs_mnt = kern_mount(&aafs_ops); 2452 2452 if (IS_ERR(aafs_mnt)) 2453 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 2456 /* Populate fs tree. */ 2457 2457 error = entry_create_dir(&aa_sfs_entry, NULL);
+1 -1
security/apparmor/include/lib.h
··· 86 86 87 87 static 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