Commit 19e16281 authored by Dave Chinner's avatar Dave Chinner Committed by Long Li
Browse files

xfs: convert remaining mount flags to state flags

mainline inclusion
from mainline-v5.14-rc4
commit 2e973b2c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4KIAO
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2e973b2cd4cdb993be94cca4c33f532f1ed05316



--------------------------------

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: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>

Conflicts:
	fs/xfs/xfs_mount.c
	fs/xfs/xfs_super.c

Signed-off-by: default avatarLong Li <leo.lilong@huawei.com>
parent 6cef9dda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment