summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/checkpoint.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/f2fs/checkpoint.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/f2fs/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index dd2e73e10857..4aa69bc1c70a 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -617,17 +617,17 @@ int recover_orphan_inodes(struct f2fs_sb_info *sbi)
617 if (!is_set_ckpt_flags(sbi, CP_ORPHAN_PRESENT_FLAG)) 617 if (!is_set_ckpt_flags(sbi, CP_ORPHAN_PRESENT_FLAG))
618 return 0; 618 return 0;
619 619
620 if (s_flags & MS_RDONLY) { 620 if (s_flags & SB_RDONLY) {
621 f2fs_msg(sbi->sb, KERN_INFO, "orphan cleanup on readonly fs"); 621 f2fs_msg(sbi->sb, KERN_INFO, "orphan cleanup on readonly fs");
622 sbi->sb->s_flags &= ~MS_RDONLY; 622 sbi->sb->s_flags &= ~SB_RDONLY;
623 } 623 }
624 624
625#ifdef CONFIG_QUOTA 625#ifdef CONFIG_QUOTA
626 /* Needed for iput() to work correctly and not trash data */ 626 /* Needed for iput() to work correctly and not trash data */
627 sbi->sb->s_flags |= MS_ACTIVE; 627 sbi->sb->s_flags |= SB_ACTIVE;
628 628
629 /* Turn on quotas so that they are updated correctly */ 629 /* Turn on quotas so that they are updated correctly */
630 quota_enabled = f2fs_enable_quota_files(sbi, s_flags & MS_RDONLY); 630 quota_enabled = f2fs_enable_quota_files(sbi, s_flags & SB_RDONLY);
631#endif 631#endif
632 632
633 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi); 633 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi);
@@ -658,7 +658,7 @@ out:
658 if (quota_enabled) 658 if (quota_enabled)
659 f2fs_quota_off_umount(sbi->sb); 659 f2fs_quota_off_umount(sbi->sb);
660#endif 660#endif
661 sbi->sb->s_flags = s_flags; /* Restore MS_RDONLY status */ 661 sbi->sb->s_flags = s_flags; /* Restore SB_RDONLY status */
662 662
663 return err; 663 return err;
664} 664}