xfs: acquire ->ail_lock from xfs_trans_ail_delete()
Several callers acquire the lock just prior to the call. Callers that require ->ail_lock for other purposes already check IN_AIL state and thus don't require the additional shutdown check in the helper. Push the lock down into xfs_trans_ail_delete(), open code the instances that still acquire it, and remove the unnecessary ailp parameter. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Allison Collins <allison.henderson@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
b707fffda6
commit
849274c103
@@ -1021,6 +1021,7 @@ xfs_qm_dqflush_done(
|
||||
struct xfs_dq_logitem *qip = (struct xfs_dq_logitem *)lip;
|
||||
struct xfs_dquot *dqp = qip->qli_dquot;
|
||||
struct xfs_ail *ailp = lip->li_ailp;
|
||||
xfs_lsn_t tail_lsn;
|
||||
|
||||
/*
|
||||
* We only want to pull the item from the AIL if its
|
||||
@@ -1034,10 +1035,11 @@ xfs_qm_dqflush_done(
|
||||
((lip->li_lsn == qip->qli_flush_lsn) ||
|
||||
test_bit(XFS_LI_FAILED, &lip->li_flags))) {
|
||||
|
||||
/* xfs_trans_ail_delete() drops the AIL lock. */
|
||||
spin_lock(&ailp->ail_lock);
|
||||
if (lip->li_lsn == qip->qli_flush_lsn) {
|
||||
xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE);
|
||||
/* xfs_ail_update_finish() drops the AIL lock */
|
||||
tail_lsn = xfs_ail_delete_one(ailp, lip);
|
||||
xfs_ail_update_finish(ailp, tail_lsn);
|
||||
} else {
|
||||
/*
|
||||
* Clear the failed state since we are about to drop the
|
||||
|
Reference in New Issue
Block a user