public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 3/4] xfs: reset buffer pointers before freeing them
Date: Thu, 21 Apr 2011 00:52:03 -0400	[thread overview]
Message-ID: <20110421045203.GB28859@infradead.org> (raw)
In-Reply-To: <1303360144-10632-4-git-send-email-david@fromorbit.com>

>  		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 <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-04-21  4:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  4:29 [PATCH 0/4] xfs: candidate fixes for 2.6.39-rc4 Dave Chinner
2011-04-21  4:29 ` [PATCH 1/4] xfs: fix xfs_itruncate_start tracing Dave Chinner
2011-04-21  4:29 ` [PATCH 2/4] xfs: don't look forever in xfs_inode_ag_walk during async inode flushes Dave Chinner
2011-04-21  4:29 ` [PATCH 3/4] xfs: reset buffer pointers before freeing them Dave Chinner
2011-04-21  4:52   ` Christoph Hellwig [this message]
2011-04-21  6:53     ` Dave Chinner
2011-04-21  4:29 ` [PATCH 4/4] xfs: obey minleft values during extent allocation correctly Dave Chinner
2011-04-21  4:44   ` Christoph Hellwig
2011-04-21  5:05   ` Lachlan McIlroy
2011-04-21  6:53     ` Dave Chinner
2011-04-21 13:48       ` Lachlan McIlroy
2011-04-21 20:48 ` [PATCH 0/4] xfs: candidate fixes for 2.6.39-rc4 Alex Elder
  -- strict thread matches above, loose matches on Subject: below --
2011-04-21  9:34 [PATCH 0/4] xfs: candidate fixes for 2.6.39-rc4 v2 Dave Chinner
2011-04-21  9:34 ` [PATCH 3/4] xfs: reset buffer pointers before freeing them Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110421045203.GB28859@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox