On Thu, Jul 09, 2020 at 05:04:50PM +0200, Christoph Hellwig wrote: > Reuse xfs_buf_item_relse instead of duplicating it. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Looks good to me, Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --D > --- > fs/xfs/xfs_buf_item.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c > index ccc9d69683fae4..ccfd747d32e410 100644 > --- a/fs/xfs/xfs_buf_item.c > +++ b/fs/xfs/xfs_buf_item.c > @@ -959,8 +959,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 > @@ -970,8 +968,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); > } > -- > 2.26.2 >