diff options
author | Dave Chinner <dchinner@redhat.com> | 2021-08-10 17:59:02 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-08-16 12:09:28 -0700 |
commit | e1d06e5f668a403f48538f0d6b163edfd4342adf (patch) | |
tree | 6cc1a1d760374d1fefbf0c9d37b320558acae63b /fs/xfs/xfs_super.c | |
parent | fd67d8a07208ab06560287b7b9334c2d50b7d6d7 (diff) | |
download | linux-stable-e1d06e5f668a403f48538f0d6b163edfd4342adf.tar.gz linux-stable-e1d06e5f668a403f48538f0d6b163edfd4342adf.tar.bz2 linux-stable-e1d06e5f668a403f48538f0d6b163edfd4342adf.zip |
xfs: convert log flags to an operational state field
log->l_flags doesn't actually contain "flags" as such, it contains
operational state information that can change at runtime. For the
shutdown state, this at least should be an atomic bit because
it is read without holding locks in many places and so using atomic
bitops for the state field modifications makes sense.
This allows us to use things like test_and_set_bit() on state
changes (e.g. setting XLOG_TAIL_WARN) to avoid races in setting the
state when we aren't holding locks.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 16a3ea6eae13..53ce25008948 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -710,7 +710,7 @@ xfs_fs_drop_inode( * that. See the comment for this inode flag. */ if (ip->i_flags & XFS_IRECOVERY) { - ASSERT(ip->i_mount->m_log->l_flags & XLOG_RECOVERY_NEEDED); + ASSERT(xlog_recovery_needed(ip->i_mount->m_log)); return 0; } |