xfs
[Top] [All Lists]

Re: [PATCH 3/4] xfs: reset buffer pointers before freeing them

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/4] xfs: reset buffer pointers before freeing them
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 21 Apr 2011 16:53:49 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110421045203.GB28859@xxxxxxxxxxxxx>
References: <1303360144-10632-1-git-send-email-david@xxxxxxxxxxxxx> <1303360144-10632-4-git-send-email-david@xxxxxxxxxxxxx> <20110421045203.GB28859@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Thu, Apr 21, 2011 at 12:52:03AM -0400, Christoph Hellwig wrote:
> >             ealign = round_down(end_block, sectbb);
> >             if (j == 0 && (start_block + endcount > ealign)) {
> > -                   offset = XFS_BUF_PTR(bp);
> > -                   balign = BBTOB(ealign - start_block);
> > -                   error = XFS_BUF_SET_PTR(bp, offset + balign,
> > -                                           BBTOB(sectbb));
> > +                   balign = ealign - start_block;
> > +                   offset = XFS_BUF_PTR(bp) + BBTOB(balign);
> > +                   error = xlog_bread_offset(log, ealign, sectbb,
> > +                                                   bp, offset);
> 
> I'd remove the use of balign entirely here.  The first use of this
> variable earlier in the functions is for something entirely different,
> so it's rather confusing.  (I only looked into that because I remember
> some align variable beeing used later on, but that was elsewhere)

Ok, will do.

> Otherwise looks good,
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Thanks.

-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>