Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04913fdd authored by Dave Chinner's avatar Dave Chinner Committed by Ben Myers
Browse files

xfs: pass shutdown method into xfs_trans_ail_delete_bulk



xfs_trans_ail_delete_bulk() can be called from different contexts so
if the item is not in the AIL we need different shutdown for each
context.  Pass in the shutdown method needed so the correct action
can be taken.

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent a8569171
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ xfs_buf_item_unpin(
			bp->b_iodone = NULL;
		} else {
			spin_lock(&ailp->xa_lock);
			xfs_trans_ail_delete(ailp, (xfs_log_item_t *)bip);
			xfs_trans_ail_delete(ailp, lip, SHUTDOWN_LOG_IO_ERROR);
			xfs_buf_item_relse(bp);
			ASSERT(bp->b_fspriv == NULL);
		}
@@ -1006,6 +1006,6 @@ xfs_buf_iodone(
	 * Either way, AIL is useless if we're forcing a shutdown.
	 */
	spin_lock(&ailp->xa_lock);
	xfs_trans_ail_delete(ailp, lip);
	xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE);
	xfs_buf_item_free(BUF_ITEM(lip));
}
+3 −2
Original line number Diff line number Diff line
@@ -857,7 +857,7 @@ xfs_qm_dqflush_done(
		/* xfs_trans_ail_delete() drops the AIL lock. */
		spin_lock(&ailp->xa_lock);
		if (lip->li_lsn == qip->qli_flush_lsn)
			xfs_trans_ail_delete(ailp, lip);
			xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE);
		else
			spin_unlock(&ailp->xa_lock);
	}
@@ -909,7 +909,8 @@ xfs_qm_dqflush(

		spin_lock(&mp->m_ail->xa_lock);
		if (lip->li_flags & XFS_LI_IN_AIL)
			xfs_trans_ail_delete(mp->m_ail, lip);
			xfs_trans_ail_delete(mp->m_ail, lip,
					     SHUTDOWN_CORRUPT_INCORE);
		else
			spin_unlock(&mp->m_ail->xa_lock);
		error = XFS_ERROR(EIO);
+1 −1
Original line number Diff line number Diff line
@@ -384,7 +384,7 @@ xfs_qm_qoffend_logitem_committed(
	 * xfs_trans_ail_delete() drops the AIL lock.
	 */
	spin_lock(&ailp->xa_lock);
	xfs_trans_ail_delete(ailp, (xfs_log_item_t *)qfs);
	xfs_trans_ail_delete(ailp, &qfs->qql_item, SHUTDOWN_LOG_IO_ERROR);

	kmem_free(qfs);
	kmem_free(qfe);
+2 −1
Original line number Diff line number Diff line
@@ -64,7 +64,8 @@ __xfs_efi_release(
	if (!test_and_clear_bit(XFS_EFI_COMMITTED, &efip->efi_flags)) {
		spin_lock(&ailp->xa_lock);
		/* xfs_trans_ail_delete() drops the AIL lock. */
		xfs_trans_ail_delete(ailp, &efip->efi_item);
		xfs_trans_ail_delete(ailp, &efip->efi_item,
				     SHUTDOWN_LOG_IO_ERROR);
		xfs_efi_item_free(efip);
	}
}
+2 −2
Original line number Diff line number Diff line
@@ -2377,7 +2377,7 @@ cluster_corrupt_out:
	/*
	 * Unlocks the flush lock
	 */
	xfs_iflush_abort(iq);
	xfs_iflush_abort(iq, false);
	kmem_free(ilist);
	xfs_perag_put(pag);
	return XFS_ERROR(EFSCORRUPTED);
@@ -2482,7 +2482,7 @@ abort_out:
	/*
	 * Unlocks the flush lock
	 */
	xfs_iflush_abort(ip);
	xfs_iflush_abort(ip, false);
	return error;
}

Loading