xfs: call xfs_buf_delwri_queue directly
Unify the ways we add buffers to the delwri queue by always calling xfs_buf_delwri_queue directly. The xfs_bdwrite functions is removed and opencoded in its callers, and the two places setting XBF_DELWRI while a buffer is locked and expecting xfs_buf_unlock to pick it up are converted to call xfs_buf_delwri_queue directly, too. Also replace the XFS_BUF_UNDELAYWRITE macro with direct calls to xfs_buf_delwri_dequeue to make the explicit queuing/dequeuing more obvious. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
committed by
Alex Elder
parent
5a8ee6bafd
commit
61551f1ee5
@@ -2176,7 +2176,8 @@ xlog_recover_buffer_pass2(
|
||||
} else {
|
||||
ASSERT(bp->b_target->bt_mount == mp);
|
||||
bp->b_iodone = xlog_recover_iodone;
|
||||
xfs_bdwrite(mp, bp);
|
||||
xfs_buf_delwri_queue(bp);
|
||||
xfs_buf_relse(bp);
|
||||
}
|
||||
|
||||
return (error);
|
||||
@@ -2439,7 +2440,8 @@ xlog_recover_inode_pass2(
|
||||
write_inode_buffer:
|
||||
ASSERT(bp->b_target->bt_mount == mp);
|
||||
bp->b_iodone = xlog_recover_iodone;
|
||||
xfs_bdwrite(mp, bp);
|
||||
xfs_buf_delwri_queue(bp);
|
||||
xfs_buf_relse(bp);
|
||||
error:
|
||||
if (need_free)
|
||||
kmem_free(in_f);
|
||||
@@ -2561,7 +2563,8 @@ xlog_recover_dquot_pass2(
|
||||
ASSERT(dq_f->qlf_size == 2);
|
||||
ASSERT(bp->b_target->bt_mount == mp);
|
||||
bp->b_iodone = xlog_recover_iodone;
|
||||
xfs_bdwrite(mp, bp);
|
||||
xfs_buf_delwri_queue(bp);
|
||||
xfs_buf_relse(bp);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user