Skip to content

Commit 4885235

Browse files
dgchinnerBen Myers
authored andcommitted
xfs: lock the AIL before removing the buffer item
Regression introduced by commit 46f9d2e ("xfs: aborted buf items can be in the AIL") which fails to lock the AIL before removing the item. Spinlock debugging throws a warning about this. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
1 parent 272b98c commit 4885235

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/xfs/xfs_buf_item.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ xfs_buf_item_unlock(
628628
else if (aborted) {
629629
ASSERT(XFS_FORCED_SHUTDOWN(lip->li_mountp));
630630
if (lip->li_flags & XFS_LI_IN_AIL) {
631+
spin_lock(&lip->li_ailp->xa_lock);
631632
xfs_trans_ail_delete(lip->li_ailp, lip,
632633
SHUTDOWN_LOG_IO_ERROR);
633634
}

0 commit comments

Comments
 (0)