X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,J_CHICKENPOX_56 autolearn=no version=3.4.0-r929098 Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p3L4mZ8Y134777 for ; Wed, 20 Apr 2011 23:48:36 -0500 X-ASG-Debug-ID: 1303361523-014702dd0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B80BB150785C for ; Wed, 20 Apr 2011 21:52:03 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 6Oy1XMFkjRTvJ7XZ for ; Wed, 20 Apr 2011 21:52:03 -0700 (PDT) X-ASG-Whitelist: Client X-ASG-Whitelist: Barracuda Reputation Received: from hch by bombadil.infradead.org with local (Exim 4.72 #1 (Red Hat Linux)) id 1QCls3-0001TR-7U; Thu, 21 Apr 2011 04:52:03 +0000 Date: Thu, 21 Apr 2011 00:52:03 -0400 From: Christoph Hellwig To: Dave Chinner Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 3/4] xfs: reset buffer pointers before freeing them Subject: Re: [PATCH 3/4] xfs: reset buffer pointers before freeing them Message-ID: <20110421045203.GB28859@infradead.org> References: <1303360144-10632-1-git-send-email-david@fromorbit.com> <1303360144-10632-4-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1303360144-10632-4-git-send-email-david@fromorbit.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1303361523 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean > 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) Otherwise looks good, Reviewed-by: Christoph Hellwig