From: Eric Sandeen <sandeen@sandeen.net>
To: Brian Foster <bfoster@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: check correct status variable for xfs_inobt_get_rec() call
Date: Tue, 27 Aug 2013 16:25:57 -0500 [thread overview]
Message-ID: <521D1965.20009@sandeen.net> (raw)
In-Reply-To: <1377638145-18800-1-git-send-email-bfoster@redhat.com>
On 8/27/13 4:15 PM, Brian Foster wrote:
> The call to xfs_inobt_get_rec() in xfs_dialloc_ag() passes 'j' as
> the output status variable. The immediately following
> XFS_WANT_CORRUPTED_GOTO() checks the value of 'i,' which is from
> the previous lookup call and has already been checked. Fix the
> corruption check to use 'j.'
>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
whoops! That's been there a while, good catch.
It's harmless in the non-corruption case, but misses the corruption case...
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> ---
> fs/xfs/xfs_ialloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
> index 6bee95d..ccf2fb1 100644
> --- a/fs/xfs/xfs_ialloc.c
> +++ b/fs/xfs/xfs_ialloc.c
> @@ -729,7 +729,7 @@ xfs_dialloc_ag(
> error = xfs_inobt_get_rec(cur, &rec, &j);
> if (error)
> goto error0;
> - XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
> + XFS_WANT_CORRUPTED_GOTO(j == 1, error0);
>
> if (rec.ir_freecount > 0) {
> /*
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-08-27 21:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 21:15 [PATCH] xfs: check correct status variable for xfs_inobt_get_rec() call Brian Foster
2013-08-27 21:25 ` Eric Sandeen [this message]
2013-08-27 22:47 ` Dave Chinner
2013-08-30 18:49 ` Ben Myers
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=521D1965.20009@sandeen.net \
--to=sandeen@sandeen.net \
--cc=bfoster@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.