diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-27 16:05:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-27 16:05:09 -0500 |
commit | 1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e (patch) | |
tree | 83c57e4aeda0665cb131de862364b7a5cfd7dd66 /fs/cifs | |
parent | 141cbfba1d0502006463aa80f57c64086226af1a (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/cifs')
-rw-r--r-- | fs/cifs/cifs_fs_sb.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 12 | ||||
-rw-r--r-- | fs/cifs/cifsglob.h | 4 | ||||
-rw-r--r-- | fs/cifs/inode.c | 2 | ||||
-rw-r--r-- | fs/cifs/xattr.c | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h index cbd216b57239..350fa55a1bf7 100644 --- a/fs/cifs/cifs_fs_sb.h +++ b/fs/cifs/cifs_fs_sb.h | |||
@@ -42,7 +42,7 @@ | |||
42 | #define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */ | 42 | #define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */ |
43 | #define CIFS_MOUNT_STRICT_IO 0x40000 /* strict cache mode */ | 43 | #define CIFS_MOUNT_STRICT_IO 0x40000 /* strict cache mode */ |
44 | #define CIFS_MOUNT_RWPIDFORWARD 0x80000 /* use pid forwarding for rw */ | 44 | #define CIFS_MOUNT_RWPIDFORWARD 0x80000 /* use pid forwarding for rw */ |
45 | #define CIFS_MOUNT_POSIXACL 0x100000 /* mirror of MS_POSIXACL in mnt_cifs_flags */ | 45 | #define CIFS_MOUNT_POSIXACL 0x100000 /* mirror of SB_POSIXACL in mnt_cifs_flags */ |
46 | #define CIFS_MOUNT_CIFS_BACKUPUID 0x200000 /* backup intent bit for a user */ | 46 | #define CIFS_MOUNT_CIFS_BACKUPUID 0x200000 /* backup intent bit for a user */ |
47 | #define CIFS_MOUNT_CIFS_BACKUPGID 0x400000 /* backup intent bit for a group */ | 47 | #define CIFS_MOUNT_CIFS_BACKUPGID 0x400000 /* backup intent bit for a group */ |
48 | #define CIFS_MOUNT_MAP_SFM_CHR 0x800000 /* SFM/MAC mapping for illegal chars */ | 48 | #define CIFS_MOUNT_MAP_SFM_CHR 0x800000 /* SFM/MAC mapping for illegal chars */ |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 8c8b75d33f31..31b7565b1617 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -125,7 +125,7 @@ cifs_read_super(struct super_block *sb) | |||
125 | tcon = cifs_sb_master_tcon(cifs_sb); | 125 | tcon = cifs_sb_master_tcon(cifs_sb); |
126 | 126 | ||
127 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIXACL) | 127 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIXACL) |
128 | sb->s_flags |= MS_POSIXACL; | 128 | sb->s_flags |= SB_POSIXACL; |
129 | 129 | ||
130 | if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) | 130 | if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) |
131 | sb->s_maxbytes = MAX_LFS_FILESIZE; | 131 | sb->s_maxbytes = MAX_LFS_FILESIZE; |
@@ -497,7 +497,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root) | |||
497 | seq_puts(s, ",cifsacl"); | 497 | seq_puts(s, ",cifsacl"); |
498 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) | 498 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) |
499 | seq_puts(s, ",dynperm"); | 499 | seq_puts(s, ",dynperm"); |
500 | if (root->d_sb->s_flags & MS_POSIXACL) | 500 | if (root->d_sb->s_flags & SB_POSIXACL) |
501 | seq_puts(s, ",acl"); | 501 | seq_puts(s, ",acl"); |
502 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) | 502 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MF_SYMLINKS) |
503 | seq_puts(s, ",mfsymlinks"); | 503 | seq_puts(s, ",mfsymlinks"); |
@@ -573,7 +573,7 @@ static int cifs_show_stats(struct seq_file *s, struct dentry *root) | |||
573 | static int cifs_remount(struct super_block *sb, int *flags, char *data) | 573 | static int cifs_remount(struct super_block *sb, int *flags, char *data) |
574 | { | 574 | { |
575 | sync_filesystem(sb); | 575 | sync_filesystem(sb); |
576 | *flags |= MS_NODIRATIME; | 576 | *flags |= SB_NODIRATIME; |
577 | return 0; | 577 | return 0; |
578 | } | 578 | } |
579 | 579 | ||
@@ -708,7 +708,7 @@ cifs_do_mount(struct file_system_type *fs_type, | |||
708 | 708 | ||
709 | rc = cifs_mount(cifs_sb, volume_info); | 709 | rc = cifs_mount(cifs_sb, volume_info); |
710 | if (rc) { | 710 | if (rc) { |
711 | if (!(flags & MS_SILENT)) | 711 | if (!(flags & SB_SILENT)) |
712 | cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n", | 712 | cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n", |
713 | rc); | 713 | rc); |
714 | root = ERR_PTR(rc); | 714 | root = ERR_PTR(rc); |
@@ -720,7 +720,7 @@ cifs_do_mount(struct file_system_type *fs_type, | |||
720 | mnt_data.flags = flags; | 720 | mnt_data.flags = flags; |
721 | 721 | ||
722 | /* BB should we make this contingent on mount parm? */ | 722 | /* BB should we make this contingent on mount parm? */ |
723 | flags |= MS_NODIRATIME | MS_NOATIME; | 723 | flags |= SB_NODIRATIME | SB_NOATIME; |
724 | 724 | ||
725 | sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data); | 725 | sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data); |
726 | if (IS_ERR(sb)) { | 726 | if (IS_ERR(sb)) { |
@@ -739,7 +739,7 @@ cifs_do_mount(struct file_system_type *fs_type, | |||
739 | goto out_super; | 739 | goto out_super; |
740 | } | 740 | } |
741 | 741 | ||
742 | sb->s_flags |= MS_ACTIVE; | 742 | sb->s_flags |= SB_ACTIVE; |
743 | } | 743 | } |
744 | 744 | ||
745 | root = cifs_get_root(volume_info, sb); | 745 | root = cifs_get_root(volume_info, sb); |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index e185b2853eab..b16583594d1a 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -559,8 +559,8 @@ struct smb_vol { | |||
559 | CIFS_MOUNT_MULTIUSER | CIFS_MOUNT_STRICT_IO | \ | 559 | CIFS_MOUNT_MULTIUSER | CIFS_MOUNT_STRICT_IO | \ |
560 | CIFS_MOUNT_CIFS_BACKUPUID | CIFS_MOUNT_CIFS_BACKUPGID) | 560 | CIFS_MOUNT_CIFS_BACKUPUID | CIFS_MOUNT_CIFS_BACKUPGID) |
561 | 561 | ||
562 | #define CIFS_MS_MASK (MS_RDONLY | MS_MANDLOCK | MS_NOEXEC | MS_NOSUID | \ | 562 | #define CIFS_MS_MASK (SB_RDONLY | SB_MANDLOCK | SB_NOEXEC | SB_NOSUID | \ |
563 | MS_NODEV | MS_SYNCHRONOUS) | 563 | SB_NODEV | SB_SYNCHRONOUS) |
564 | 564 | ||
565 | struct cifs_mnt_data { | 565 | struct cifs_mnt_data { |
566 | struct cifs_sb_info *cifs_sb; | 566 | struct cifs_sb_info *cifs_sb; |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 7c732cb44164..ecb99079363a 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -985,7 +985,7 @@ retry_iget5_locked: | |||
985 | } | 985 | } |
986 | 986 | ||
987 | cifs_fattr_to_inode(inode, fattr); | 987 | cifs_fattr_to_inode(inode, fattr); |
988 | if (sb->s_flags & MS_NOATIME) | 988 | if (sb->s_flags & SB_NOATIME) |
989 | inode->i_flags |= S_NOATIME | S_NOCMTIME; | 989 | inode->i_flags |= S_NOATIME | S_NOCMTIME; |
990 | if (inode->i_state & I_NEW) { | 990 | if (inode->i_state & I_NEW) { |
991 | inode->i_ino = hash; | 991 | inode->i_ino = hash; |
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 52f975d848a0..316af84674f1 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -117,7 +117,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler, | |||
117 | #ifdef CONFIG_CIFS_POSIX | 117 | #ifdef CONFIG_CIFS_POSIX |
118 | if (!value) | 118 | if (!value) |
119 | goto out; | 119 | goto out; |
120 | if (sb->s_flags & MS_POSIXACL) | 120 | if (sb->s_flags & SB_POSIXACL) |
121 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, | 121 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, |
122 | value, (const int)size, | 122 | value, (const int)size, |
123 | ACL_TYPE_ACCESS, cifs_sb->local_nls, | 123 | ACL_TYPE_ACCESS, cifs_sb->local_nls, |
@@ -129,7 +129,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler, | |||
129 | #ifdef CONFIG_CIFS_POSIX | 129 | #ifdef CONFIG_CIFS_POSIX |
130 | if (!value) | 130 | if (!value) |
131 | goto out; | 131 | goto out; |
132 | if (sb->s_flags & MS_POSIXACL) | 132 | if (sb->s_flags & SB_POSIXACL) |
133 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, | 133 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, |
134 | value, (const int)size, | 134 | value, (const int)size, |
135 | ACL_TYPE_DEFAULT, cifs_sb->local_nls, | 135 | ACL_TYPE_DEFAULT, cifs_sb->local_nls, |
@@ -266,7 +266,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler, | |||
266 | 266 | ||
267 | case XATTR_ACL_ACCESS: | 267 | case XATTR_ACL_ACCESS: |
268 | #ifdef CONFIG_CIFS_POSIX | 268 | #ifdef CONFIG_CIFS_POSIX |
269 | if (sb->s_flags & MS_POSIXACL) | 269 | if (sb->s_flags & SB_POSIXACL) |
270 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 270 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
271 | value, size, ACL_TYPE_ACCESS, | 271 | value, size, ACL_TYPE_ACCESS, |
272 | cifs_sb->local_nls, | 272 | cifs_sb->local_nls, |
@@ -276,7 +276,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler, | |||
276 | 276 | ||
277 | case XATTR_ACL_DEFAULT: | 277 | case XATTR_ACL_DEFAULT: |
278 | #ifdef CONFIG_CIFS_POSIX | 278 | #ifdef CONFIG_CIFS_POSIX |
279 | if (sb->s_flags & MS_POSIXACL) | 279 | if (sb->s_flags & SB_POSIXACL) |
280 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 280 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
281 | value, size, ACL_TYPE_DEFAULT, | 281 | value, size, ACL_TYPE_DEFAULT, |
282 | cifs_sb->local_nls, | 282 | cifs_sb->local_nls, |