From: Dave Chinner Date: Wed, 9 May 2018 14:49:10 +0000 (-0700) Subject: xfs: add some more debug checks to buffer log item reuse X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1a2ebf835a3c23e0491e3279959cfb6c65a6ebbb;p=linux.git xfs: add some more debug checks to buffer log item reuse Just to make sure the item isn't associated with another transaction when we try to reuse it. Signed-Off-By: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index df62082f22042..8d6ed045b643d 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -745,8 +745,10 @@ xfs_buf_item_init( * nothing to do here so return. */ ASSERT(bp->b_target->bt_mount == mp); - if (bip != NULL) { + if (bip) { ASSERT(bip->bli_item.li_type == XFS_LI_BUF); + ASSERT(!bp->b_transp); + ASSERT(bip->bli_buf == bp); return 0; }