From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: fix directory readahead offset off-by-one
Date: Tue, 6 May 2014 00:56:37 -0700 [thread overview]
Message-ID: <20140506075637.GA13191@infradead.org> (raw)
In-Reply-To: <1399347728-19752-1-git-send-email-david@fromorbit.com>
On Tue, May 06, 2014 at 01:42:08PM +1000, Dave Chinner wrote:
> Fix the warning by ensuring that the readahead offset is correctly
> incremented.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
> fs/xfs/xfs_dir2_readdir.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
> index 50b72f7..fe2db98 100644
> --- a/fs/xfs/xfs_dir2_readdir.c
> +++ b/fs/xfs/xfs_dir2_readdir.c
> @@ -456,7 +456,7 @@ xfs_dir2_leaf_readbuf(
> /*
> * Advance offset through the mapping table.
> */
> - for (j = 0; j < mp->m_dirblkfsbs; j++) {
> + for (j = 0; j < mp->m_dirblkfsbs; ) {
> /*
> * The rest of this extent but not more than a dir
> * block.
This looks correct, but it would seem a little more idiomatic to write
this as:
for (j = 0; j < mp->m_dirblkfsbs; j += length) {
and remove the j increment from the body.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-05-06 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 3:42 [PATCH] xfs: fix directory readahead offset off-by-one Dave Chinner
2014-05-06 7:56 ` Christoph Hellwig [this message]
2014-05-06 8:02 ` Dave Chinner
2014-05-06 8:05 ` Christoph Hellwig
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=20140506075637.GA13191@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