diff options
author | Dave Chinner <dchinner@redhat.com> | 2021-08-19 04:46:52 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-08-19 20:07:13 +0300 |
commit | 2e973b2cd4cdb993be94cca4c33f532f1ed05316 (patch) | |
tree | b44d08a1f5af0ef6be12f8b178975de8ac5bef92 /fs/xfs/xfs_iops.c | |
parent | 0560f31a09e523090d1ab2bfe21c69d028c2bdf2 (diff) | |
download | linux-2e973b2cd4cdb993be94cca4c33f532f1ed05316.tar.xz |
xfs: convert remaining mount flags to state flags
The remaining mount flags kept in m_flags are actually runtime state
flags. These change dynamically, so they really should be updated
atomically so we don't potentially lose an update due to racing
modifications.
Convert these remaining flags to be stored in m_opstate and use
atomic bitops to set and clear the flags. This also adds a couple of
simple wrappers for common state checks - read only and shutdown.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_iops.c')
-rw-r--r-- | fs/xfs/xfs_iops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index ff7ba534415c..2185acdf4c7a 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -673,7 +673,7 @@ xfs_vn_change_ok( { struct xfs_mount *mp = XFS_I(d_inode(dentry))->i_mount; - if (mp->m_flags & XFS_MOUNT_RDONLY) + if (xfs_is_readonly(mp)) return -EROFS; if (XFS_FORCED_SHUTDOWN(mp)) |