From: Dave Chinner Date: Tue, 24 Sep 2013 06:01:13 +0000 (+1000) Subject: xfs: lock the AIL before removing the buffer item X-Git-Tag: v3.12-rc3~10^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4885235806bb95c3fad5a5238e323cb746c3a49b;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Reviewed-by: Mark Tinguely Signed-off-by: Ben Myers --- diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 88c5ea7..f1d85cf 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -628,6 +628,7 @@ xfs_buf_item_unlock( else if (aborted) { ASSERT(XFS_FORCED_SHUTDOWN(lip->li_mountp)); if (lip->li_flags & XFS_LI_IN_AIL) { + spin_lock(&lip->li_ailp->xa_lock); xfs_trans_ail_delete(lip->li_ailp, lip, SHUTDOWN_LOG_IO_ERROR); }