xfs
[Top] [All Lists]

Re: [PATCH 2/2] xfs_logprint: don't advance op counter in xlog_print_tra

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs_logprint: don't advance op counter in xlog_print_trans_icreate
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 27 Feb 2014 12:28:52 +1100
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <530E91C8.1010207@xxxxxxxxxxx>
References: <530E8E17.1090901@xxxxxxxxxx> <530E91C8.1010207@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Feb 26, 2014 at 07:15:52PM -0600, Eric Sandeen wrote:
> xlog_print_trans_icreate is advancing the op counter
> "(*i)++" incorrectly; it only contains one region, and
> the loop which called it will properly advance the op
> once we're done.
> 
> Found-by: Dave Chinner <dchinner@xxxxxxxxxx>
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> diff --git a/logprint/log_misc.c b/logprint/log_misc.c
> index 7070fa3..52f1e85 100644
> --- a/logprint/log_misc.c
> +++ b/logprint/log_misc.c
> @@ -810,7 +810,6 @@ xlog_print_trans_icreate(
>  
>       memmove(&icl_buf, *ptr, MIN(sizeof(struct xfs_icreate_log), len));
>       icl = &icl_buf;
> -     (*i)++;
>       *ptr += len;
>  
>       /* handle complete header only */

*nod*. I'm pretty sure I introduced that bug - thanks for exposing
it and fixing it :)

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

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