From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:36466 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932344AbeEHOSc (ORCPT ); Tue, 8 May 2018 10:18:32 -0400 Date: Tue, 8 May 2018 10:18:31 -0400 From: Brian Foster Subject: Re: [PATCH 8/9] xfs: add some more debug checks to buffer log item reuse Message-ID: <20180508141831.GI4764@bfoster.bfoster> 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 > --- Reviewed-by: Brian Foster > 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