aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-27 16:05:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-27 16:05:09 -0500
commit1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e (patch)
tree83c57e4aeda0665cb131de862364b7a5cfd7dd66 /fs/affs/super.c
parent141cbfba1d0502006463aa80f57c64086226af1a (diff)
Rename superblock flags (MS_xyz -> SB_xyz)
This is a pure automated search-and-replace of the internal kernel superblock flags. The s_flags are now called SB_*, with the names and the values for the moment mirroring the MS_* flags that they're equivalent to. Note how the MS_xyz flags are the ones passed to the mount system call, while the SB_xyz flags are what we then use in sb->s_flags. The script to do this was: # places to look in; re security/*: it generally should *not* be # touched (that stuff parses mount(2) arguments directly), but # there are two places where we really deal with superblock flags. FILES="drivers/mtd drivers/staging/lustre fs ipc mm \ include/linux/fs.h include/uapi/linux/bfs_fs.h \ security/apparmor/apparmorfs.c security/apparmor/include/lib.h" # the list of MS_... constants SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \ DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \ POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \ I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \ ACTIVE NOUSER" SED_PROG= for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done # we want files that contain at least one of MS_..., # with fs/namespace.c and fs/pnode.c excluded. L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c') for f in $L; do sed -i $f $SED_PROG; done Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/affs/super.c')
-rw-r--r--fs/affs/super.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 884bedab7266..1117e36134cc 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -356,7 +356,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
356 356
357 sb->s_magic = AFFS_SUPER_MAGIC; 357 sb->s_magic = AFFS_SUPER_MAGIC;
358 sb->s_op = &affs_sops; 358 sb->s_op = &affs_sops;
359 sb->s_flags |= MS_NODIRATIME; 359 sb->s_flags |= SB_NODIRATIME;
360 360
361 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); 361 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL);
362 if (!sbi) 362 if (!sbi)
@@ -466,7 +466,7 @@ got_root:
466 if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS 466 if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS
467 || chksum == MUFS_DCOFS) && !sb_rdonly(sb)) { 467 || chksum == MUFS_DCOFS) && !sb_rdonly(sb)) {
468 pr_notice("Dircache FS - mounting %s read only\n", sb->s_id); 468 pr_notice("Dircache FS - mounting %s read only\n", sb->s_id);
469 sb->s_flags |= MS_RDONLY; 469 sb->s_flags |= SB_RDONLY;
470 } 470 }
471 switch (chksum) { 471 switch (chksum) {
472 case MUFS_FS: 472 case MUFS_FS:
@@ -488,7 +488,7 @@ got_root:
488 /* fall thru */ 488 /* fall thru */
489 case FS_OFS: 489 case FS_OFS:
490 affs_set_opt(sbi->s_flags, SF_OFS); 490 affs_set_opt(sbi->s_flags, SF_OFS);
491 sb->s_flags |= MS_NOEXEC; 491 sb->s_flags |= SB_NOEXEC;
492 break; 492 break;
493 case MUFS_DCOFS: 493 case MUFS_DCOFS:
494 case MUFS_INTLOFS: 494 case MUFS_INTLOFS:
@@ -497,7 +497,7 @@ got_root:
497 case FS_INTLOFS: 497 case FS_INTLOFS:
498 affs_set_opt(sbi->s_flags, SF_INTL); 498 affs_set_opt(sbi->s_flags, SF_INTL);
499 affs_set_opt(sbi->s_flags, SF_OFS); 499 affs_set_opt(sbi->s_flags, SF_OFS);
500 sb->s_flags |= MS_NOEXEC; 500 sb->s_flags |= SB_NOEXEC;
501 break; 501 break;
502 default: 502 default:
503 pr_err("Unknown filesystem on device %s: %08X\n", 503 pr_err("Unknown filesystem on device %s: %08X\n",
@@ -513,7 +513,7 @@ got_root:
513 sig, sig[3] + '0', blocksize); 513 sig, sig[3] + '0', blocksize);
514 } 514 }
515 515
516 sb->s_flags |= MS_NODEV | MS_NOSUID; 516 sb->s_flags |= SB_NODEV | SB_NOSUID;
517 517
518 sbi->s_data_blksize = sb->s_blocksize; 518 sbi->s_data_blksize = sb->s_blocksize;
519 if (affs_test_opt(sbi->s_flags, SF_OFS)) 519 if (affs_test_opt(sbi->s_flags, SF_OFS))
@@ -570,7 +570,7 @@ affs_remount(struct super_block *sb, int *flags, char *data)
570 pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data); 570 pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data);
571 571
572 sync_filesystem(sb); 572 sync_filesystem(sb);
573 *flags |= MS_NODIRATIME; 573 *flags |= SB_NODIRATIME;
574 574
575 memcpy(volume, sbi->s_volume, 32); 575 memcpy(volume, sbi->s_volume, 32);
576 if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block, 576 if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block,
@@ -596,10 +596,10 @@ affs_remount(struct super_block *sb, int *flags, char *data)
596 memcpy(sbi->s_volume, volume, 32); 596 memcpy(sbi->s_volume, volume, 32);
597 spin_unlock(&sbi->symlink_lock); 597 spin_unlock(&sbi->symlink_lock);
598 598
599 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb)) 599 if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
600 return 0; 600 return 0;
601 601
602 if (*flags & MS_RDONLY) 602 if (*flags & SB_RDONLY)
603 affs_free_bitmap(sb); 603 affs_free_bitmap(sb);
604 else 604 else
605 res = affs_init_bitmap(sb, flags); 605 res = affs_init_bitmap(sb, flags);