diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 21:54:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 21:54:01 -0400 |
commit | 0f0d12728e56c94d3289c6831243b6faeae8a19d (patch) | |
tree | bd52fd4ed6fba2a0d8bb95e7fc33f51ac299001d /fs/xfs/xfs_quotaops.c | |
parent | 581bfce969cbfc7ce43ee92273be9cb7c3fdfa61 (diff) | |
parent | e462ec50cb5fad19f6003a3d8087f4a0945dd2b1 (diff) |
Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull mount flag updates from Al Viro:
"Another chunk of fmount preparations from dhowells; only trivial
conflicts for that part. It separates MS_... bits (very grotty
mount(2) ABI) from the struct super_block ->s_flags (kernel-internal,
only a small subset of MS_... stuff).
This does *not* convert the filesystems to new constants; only the
infrastructure is done here. The next step in that series is where the
conflicts would be; that's the conversion of filesystems. It's purely
mechanical and it's better done after the merge, so if you could run
something like
list=$(for i in MS_RDONLY MS_NOSUID MS_NODEV MS_NOEXEC MS_SYNCHRONOUS MS_MANDLOCK MS_DIRSYNC MS_NOATIME MS_NODIRATIME MS_SILENT MS_POSIXACL MS_KERNMOUNT MS_I_VERSION MS_LAZYTIME; do git grep -l $i fs drivers/staging/lustre drivers/mtd ipc mm include/linux; done|sort|uniq|grep -v '^fs/namespace.c$')
sed -i -e 's/\<MS_RDONLY\>/SB_RDONLY/g' \
-e 's/\<MS_NOSUID\>/SB_NOSUID/g' \
-e 's/\<MS_NODEV\>/SB_NODEV/g' \
-e 's/\<MS_NOEXEC\>/SB_NOEXEC/g' \
-e 's/\<MS_SYNCHRONOUS\>/SB_SYNCHRONOUS/g' \
-e 's/\<MS_MANDLOCK\>/SB_MANDLOCK/g' \
-e 's/\<MS_DIRSYNC\>/SB_DIRSYNC/g' \
-e 's/\<MS_NOATIME\>/SB_NOATIME/g' \
-e 's/\<MS_NODIRATIME\>/SB_NODIRATIME/g' \
-e 's/\<MS_SILENT\>/SB_SILENT/g' \
-e 's/\<MS_POSIXACL\>/SB_POSIXACL/g' \
-e 's/\<MS_KERNMOUNT\>/SB_KERNMOUNT/g' \
-e 's/\<MS_I_VERSION\>/SB_I_VERSION/g' \
-e 's/\<MS_LAZYTIME\>/SB_LAZYTIME/g' \
$list
and commit it with something along the lines of 'convert filesystems
away from use of MS_... constants' as commit message, it would save a
quite a bit of headache next cycle"
* 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
VFS: Differentiate mount flags (MS_*) from internal superblock flags
VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)
vfs: Add sb_rdonly(sb) to query the MS_RDONLY flag on s_flags
Diffstat (limited to 'fs/xfs/xfs_quotaops.c')
-rw-r--r-- | fs/xfs/xfs_quotaops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_quotaops.c b/fs/xfs/xfs_quotaops.c index de9493253edf..a65108594a07 100644 --- a/fs/xfs/xfs_quotaops.c +++ b/fs/xfs/xfs_quotaops.c | |||
@@ -125,7 +125,7 @@ xfs_fs_set_info( | |||
125 | struct xfs_mount *mp = XFS_M(sb); | 125 | struct xfs_mount *mp = XFS_M(sb); |
126 | struct qc_dqblk newlim; | 126 | struct qc_dqblk newlim; |
127 | 127 | ||
128 | if (sb->s_flags & MS_RDONLY) | 128 | if (sb_rdonly(sb)) |
129 | return -EROFS; | 129 | return -EROFS; |
130 | if (!XFS_IS_QUOTA_RUNNING(mp)) | 130 | if (!XFS_IS_QUOTA_RUNNING(mp)) |
131 | return -ENOSYS; | 131 | return -ENOSYS; |
@@ -175,7 +175,7 @@ xfs_quota_enable( | |||
175 | { | 175 | { |
176 | struct xfs_mount *mp = XFS_M(sb); | 176 | struct xfs_mount *mp = XFS_M(sb); |
177 | 177 | ||
178 | if (sb->s_flags & MS_RDONLY) | 178 | if (sb_rdonly(sb)) |
179 | return -EROFS; | 179 | return -EROFS; |
180 | if (!XFS_IS_QUOTA_RUNNING(mp)) | 180 | if (!XFS_IS_QUOTA_RUNNING(mp)) |
181 | return -ENOSYS; | 181 | return -ENOSYS; |
@@ -190,7 +190,7 @@ xfs_quota_disable( | |||
190 | { | 190 | { |
191 | struct xfs_mount *mp = XFS_M(sb); | 191 | struct xfs_mount *mp = XFS_M(sb); |
192 | 192 | ||
193 | if (sb->s_flags & MS_RDONLY) | 193 | if (sb_rdonly(sb)) |
194 | return -EROFS; | 194 | return -EROFS; |
195 | if (!XFS_IS_QUOTA_RUNNING(mp)) | 195 | if (!XFS_IS_QUOTA_RUNNING(mp)) |
196 | return -ENOSYS; | 196 | return -ENOSYS; |
@@ -208,7 +208,7 @@ xfs_fs_rm_xquota( | |||
208 | struct xfs_mount *mp = XFS_M(sb); | 208 | struct xfs_mount *mp = XFS_M(sb); |
209 | unsigned int flags = 0; | 209 | unsigned int flags = 0; |
210 | 210 | ||
211 | if (sb->s_flags & MS_RDONLY) | 211 | if (sb_rdonly(sb)) |
212 | return -EROFS; | 212 | return -EROFS; |
213 | 213 | ||
214 | if (XFS_IS_QUOTA_ON(mp)) | 214 | if (XFS_IS_QUOTA_ON(mp)) |
@@ -279,7 +279,7 @@ xfs_fs_set_dqblk( | |||
279 | { | 279 | { |
280 | struct xfs_mount *mp = XFS_M(sb); | 280 | struct xfs_mount *mp = XFS_M(sb); |
281 | 281 | ||
282 | if (sb->s_flags & MS_RDONLY) | 282 | if (sb_rdonly(sb)) |
283 | return -EROFS; | 283 | return -EROFS; |
284 | if (!XFS_IS_QUOTA_RUNNING(mp)) | 284 | if (!XFS_IS_QUOTA_RUNNING(mp)) |
285 | return -ENOSYS; | 285 | return -ENOSYS; |