Commit 75c8c50f authored by Dave Chinner's avatar Dave Chinner Committed by Darrick J. Wong
Browse files

xfs: replace XFS_FORCED_SHUTDOWN with xfs_is_shutdown



Remove the shouty macro and instead use the inline function that
matches other state/feature check wrapper naming. This conversion
was done with sed.

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>
parent 2e973b2c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3079,7 +3079,7 @@ xfs_alloc_read_agf(
			atomic64_add(allocbt_blks, &mp->m_allocbt_blks);
	}
#ifdef DEBUG
	else if (!XFS_FORCED_SHUTDOWN(mp)) {
	else if (!xfs_is_shutdown(mp)) {
		ASSERT(pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks));
		ASSERT(pag->pagf_btreeblks == be32_to_cpu(agf->agf_btreeblks));
		ASSERT(pag->pagf_flcount == be32_to_cpu(agf->agf_flcount));
+2 −2
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ xfs_attr_get(

	XFS_STATS_INC(args->dp->i_mount, xs_attr_get);

	if (XFS_FORCED_SHUTDOWN(args->dp->i_mount))
	if (xfs_is_shutdown(args->dp->i_mount))
		return -EIO;

	args->geo = args->dp->i_mount->m_attr_geo;
@@ -710,7 +710,7 @@ xfs_attr_set(
	int			rmt_blks = 0;
	unsigned int		total;

	if (XFS_FORCED_SHUTDOWN(dp->i_mount))
	if (xfs_is_shutdown(dp->i_mount))
		return -EIO;

	error = xfs_qm_dqattach(dp);
+8 −8
Original line number Diff line number Diff line
@@ -3938,7 +3938,7 @@ xfs_bmapi_read(
	    XFS_TEST_ERROR(false, mp, XFS_ERRTAG_BMAPIFORMAT))
		return -EFSCORRUPTED;

	if (XFS_FORCED_SHUTDOWN(mp))
	if (xfs_is_shutdown(mp))
		return -EIO;

	XFS_STATS_INC(mp, xs_blk_mapr);
@@ -4420,7 +4420,7 @@ xfs_bmapi_write(
		return -EFSCORRUPTED;
	}

	if (XFS_FORCED_SHUTDOWN(mp))
	if (xfs_is_shutdown(mp))
		return -EIO;

	XFS_STATS_INC(mp, xs_blk_mapw);
@@ -4703,7 +4703,7 @@ xfs_bmapi_remap(
		return -EFSCORRUPTED;
	}

	if (XFS_FORCED_SHUTDOWN(mp))
	if (xfs_is_shutdown(mp))
		return -EIO;

	error = xfs_iread_extents(tp, ip, whichfork);
@@ -5361,7 +5361,7 @@ __xfs_bunmapi(
	ifp = XFS_IFORK_PTR(ip, whichfork);
	if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ifp)))
		return -EFSCORRUPTED;
	if (XFS_FORCED_SHUTDOWN(mp))
	if (xfs_is_shutdown(mp))
		return -EIO;

	ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
@@ -5852,7 +5852,7 @@ xfs_bmap_collapse_extents(
		return -EFSCORRUPTED;
	}

	if (XFS_FORCED_SHUTDOWN(mp))
	if (xfs_is_shutdown(mp))
		return -EIO;

	ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL));
@@ -5930,7 +5930,7 @@ xfs_bmap_can_insert_extents(

	ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));

	if (XFS_FORCED_SHUTDOWN(ip->i_mount))
	if (xfs_is_shutdown(ip->i_mount))
		return -EIO;

	xfs_ilock(ip, XFS_ILOCK_EXCL);
@@ -5967,7 +5967,7 @@ xfs_bmap_insert_extents(
		return -EFSCORRUPTED;
	}

	if (XFS_FORCED_SHUTDOWN(mp))
	if (xfs_is_shutdown(mp))
		return -EIO;

	ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL));
@@ -6070,7 +6070,7 @@ xfs_bmap_split_extent(
		return -EFSCORRUPTED;
	}

	if (XFS_FORCED_SHUTDOWN(mp))
	if (xfs_is_shutdown(mp))
		return -EIO;

	/* Read in all the extents */
+1 −1
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ xfs_btree_del_cursor(
	}

	ASSERT(cur->bc_btnum != XFS_BTNUM_BMAP || cur->bc_ino.allocated == 0 ||
	       XFS_FORCED_SHUTDOWN(cur->bc_mp));
	       xfs_is_shutdown(cur->bc_mp));
	if (unlikely(cur->bc_flags & XFS_BTREE_STAGING))
		kmem_free(cur->bc_ops);
	if (!(cur->bc_flags & XFS_BTREE_LONG_PTRS) && cur->bc_ag.pag)
+3 −3
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ xfs_check_agi_freecount(
			}
		} while (i == 1);

		if (!XFS_FORCED_SHUTDOWN(cur->bc_mp))
		if (!xfs_is_shutdown(cur->bc_mp))
			ASSERT(freecount == cur->bc_ag.pag->pagi_freecount);
	}
	return 0;
@@ -1784,7 +1784,7 @@ xfs_dialloc(
				break;
		}

		if (XFS_FORCED_SHUTDOWN(mp)) {
		if (xfs_is_shutdown(mp)) {
			error = -EFSCORRUPTED;
			break;
		}
@@ -2624,7 +2624,7 @@ xfs_ialloc_read_agi(
	 * we are in the middle of a forced shutdown.
	 */
	ASSERT(pag->pagi_freecount == be32_to_cpu(agi->agi_freecount) ||
		XFS_FORCED_SHUTDOWN(mp));
		xfs_is_shutdown(mp));
	return 0;
}

Loading