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/fuse/inode.c | |
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/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 2f504d615d92..624f18bbfd2b 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -130,7 +130,7 @@ static void fuse_evict_inode(struct inode *inode) | |||
130 | { | 130 | { |
131 | truncate_inode_pages_final(&inode->i_data); | 131 | truncate_inode_pages_final(&inode->i_data); |
132 | clear_inode(inode); | 132 | clear_inode(inode); |
133 | if (inode->i_sb->s_flags & MS_ACTIVE) { | 133 | if (inode->i_sb->s_flags & SB_ACTIVE) { |
134 | struct fuse_conn *fc = get_fuse_conn(inode); | 134 | struct fuse_conn *fc = get_fuse_conn(inode); |
135 | struct fuse_inode *fi = get_fuse_inode(inode); | 135 | struct fuse_inode *fi = get_fuse_inode(inode); |
136 | fuse_queue_forget(fc, fi->forget, fi->nodeid, fi->nlookup); | 136 | fuse_queue_forget(fc, fi->forget, fi->nodeid, fi->nlookup); |
@@ -141,7 +141,7 @@ static void fuse_evict_inode(struct inode *inode) | |||
141 | static int fuse_remount_fs(struct super_block *sb, int *flags, char *data) | 141 | static int fuse_remount_fs(struct super_block *sb, int *flags, char *data) |
142 | { | 142 | { |
143 | sync_filesystem(sb); | 143 | sync_filesystem(sb); |
144 | if (*flags & MS_MANDLOCK) | 144 | if (*flags & SB_MANDLOCK) |
145 | return -EINVAL; | 145 | return -EINVAL; |
146 | 146 | ||
147 | return 0; | 147 | return 0; |
@@ -1056,10 +1056,10 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
1056 | int is_bdev = sb->s_bdev != NULL; | 1056 | int is_bdev = sb->s_bdev != NULL; |
1057 | 1057 | ||
1058 | err = -EINVAL; | 1058 | err = -EINVAL; |
1059 | if (sb->s_flags & MS_MANDLOCK) | 1059 | if (sb->s_flags & SB_MANDLOCK) |
1060 | goto err; | 1060 | goto err; |
1061 | 1061 | ||
1062 | sb->s_flags &= ~(MS_NOSEC | SB_I_VERSION); | 1062 | sb->s_flags &= ~(SB_NOSEC | SB_I_VERSION); |
1063 | 1063 | ||
1064 | if (!parse_fuse_opt(data, &d, is_bdev)) | 1064 | if (!parse_fuse_opt(data, &d, is_bdev)) |
1065 | goto err; | 1065 | goto err; |
@@ -1109,9 +1109,9 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) | |||
1109 | goto err_dev_free; | 1109 | goto err_dev_free; |
1110 | 1110 | ||
1111 | /* Handle umasking inside the fuse code */ | 1111 | /* Handle umasking inside the fuse code */ |
1112 | if (sb->s_flags & MS_POSIXACL) | 1112 | if (sb->s_flags & SB_POSIXACL) |
1113 | fc->dont_mask = 1; | 1113 | fc->dont_mask = 1; |
1114 | sb->s_flags |= MS_POSIXACL; | 1114 | sb->s_flags |= SB_POSIXACL; |
1115 | 1115 | ||
1116 | fc->default_permissions = d.default_permissions; | 1116 | fc->default_permissions = d.default_permissions; |
1117 | fc->allow_other = d.allow_other; | 1117 | fc->allow_other = d.allow_other; |