summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf_item.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-01 10:55:46 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-09-15 20:52:39 -0700
commitb840e2ada8afc53583e578d2d56df7339604c1a3 (patch)
tree9aa0a4e3d2f87b528f6800c1a2b88289cbc1892c /fs/xfs/xfs_buf_item.c
parent70796c6b74c2aa49a1b341b7646c1498bd27ea81 (diff)
downloadlwn-b840e2ada8afc53583e578d2d56df7339604c1a3.tar.gz
lwn-b840e2ada8afc53583e578d2d56df7339604c1a3.zip
xfs: use xfs_buf_item_relse in xfs_buf_item_done
Reuse xfs_buf_item_relse instead of duplicating it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_buf_item.c')
-rw-r--r--fs/xfs/xfs_buf_item.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 9245c62b48f9..5a7293d0719b 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -958,8 +958,6 @@ void
xfs_buf_item_done(
struct xfs_buf *bp)
{
- struct xfs_buf_log_item *bip = bp->b_log_item;
-
/*
* If we are forcibly shutting down, this may well be off the AIL
* already. That's because we simulate the log-committed callbacks to
@@ -969,8 +967,7 @@ xfs_buf_item_done(
*
* Either way, AIL is useless if we're forcing a shutdown.
*/
- xfs_trans_ail_delete(&bip->bli_item, SHUTDOWN_CORRUPT_INCORE);
- bp->b_log_item = NULL;
- xfs_buf_item_free(bip);
- xfs_buf_rele(bp);
+ xfs_trans_ail_delete(&bp->b_log_item->bli_item,
+ SHUTDOWN_CORRUPT_INCORE);
+ xfs_buf_item_relse(bp);
}