diff options
author | Dave Chinner <dchinner@redhat.com> | 2021-08-11 03:59:01 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-08-16 22:09:27 +0300 |
commit | 2039a272300b949c05888428877317b834c0b1fb (patch) | |
tree | 7d5799f7692b1e76e1b5c990d0e98c4e5daf8173 /fs/xfs/xfs_log_priv.h | |
parent | edf27485eb566abae809517520a9adbc242b8b39 (diff) | |
download | linux-2039a272300b949c05888428877317b834c0b1fb.tar.xz |
xfs: convert XLOG_FORCED_SHUTDOWN() to xlog_is_shutdown()
Make it less shouty and a static inline before adding more calls
through the log code.
Also convert internal log code that uses XFS_FORCED_SHUTDOWN(mount)
to use xlog_is_shutdown(log) as well.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r-- | fs/xfs/xfs_log_priv.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 6953f86f866c..e29fcb12dcb1 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h @@ -464,8 +464,11 @@ struct xlog { #define XLOG_BUF_CANCEL_BUCKET(log, blkno) \ ((log)->l_buf_cancel_table + ((uint64_t)blkno % XLOG_BC_TABLE_SIZE)) -#define XLOG_FORCED_SHUTDOWN(log) \ - (unlikely((log)->l_flags & XLOG_IO_ERROR)) +static inline bool +xlog_is_shutdown(struct xlog *log) +{ + return (log->l_flags & XLOG_IO_ERROR); +} /* common routines */ extern int |