Skip to content

Commit 826f7e3

Browse files
Brian Fosterdjwong
authored andcommitted
xfs: use bitops interface for buf log item AIL flag check
The xfs_log_item flags were converted to atomic bitops as of commit 22525c1 ("xfs: log item flags are racy"). The assert check for AIL presence in xfs_buf_item_relse() still uses the old value based check. This likely went unnoticed as XFS_LI_IN_AIL evaluates to 0 and causes the assert to unconditionally pass. Fix up the check. Signed-off-by: Brian Foster <[email protected]> Fixes: 22525c1 ("xfs: log item flags are racy") Reviewed-by: Eric Sandeen <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent b1de6fc commit 826f7e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_buf_item.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ xfs_buf_item_relse(
956956
struct xfs_buf_log_item *bip = bp->b_log_item;
957957

958958
trace_xfs_buf_item_relse(bp, _RET_IP_);
959-
ASSERT(!(bip->bli_item.li_flags & XFS_LI_IN_AIL));
959+
ASSERT(!test_bit(XFS_LI_IN_AIL, &bip->bli_item.li_flags));
960960

961961
bp->b_log_item = NULL;
962962
if (list_empty(&bp->b_li_list))

0 commit comments

Comments
 (0)