From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2130.oracle.com ([156.151.31.86]:38886 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935296AbeEIPTq (ORCPT ); Wed, 9 May 2018 11:19:46 -0400 Date: Wed, 9 May 2018 08:19:42 -0700 From: "Darrick J. Wong" Subject: Re: [PATCH 8/9] xfs: add some more debug checks to buffer log item reuse Message-ID: <20180509151942.GP11261@magnolia> References: <20180508034202.10136-1-david@fromorbit.com> <20180508034202.10136-9-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180508034202.10136-9-david@fromorbit.com> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Dave Chinner Cc: linux-xfs@vger.kernel.org On Tue, May 08, 2018 at 01:42:01PM +1000, Dave Chinner wrote: > From: Dave Chinner > > 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 Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_buf_item.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c > index df62082f2204..8d6ed045b643 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; > } > > -- > 2.17.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html