public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Carlos Maiolino <cmaiolino@redhat.com>
To: xfs@oss.sgi.com
Cc: hch@lst.de
Subject: Re: [PATCH] xfs: always set rvalp in xfs_dir2_node_trim_free
Date: Fri, 11 Mar 2016 12:05:54 +0100	[thread overview]
Message-ID: <20160311110554.GA3163@redhat.com> (raw)
In-Reply-To: <1457689337-4018-1-git-send-email-hch@lst.de>

I was just sending this patch when I saw yours.

Looks good to me:

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

On Fri, Mar 11, 2016 at 10:42:17AM +0100, Christoph Hellwig wrote:
> xfs_dir2_node_trim_free can return with setting the rvalp argument
> pointer.  Initialize it to 0 at the beginning of the function and
> only update it to 1 if we succeeded trimming a freespace block.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  fs/xfs/libxfs/xfs_dir2_node.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs/xfs_dir2_node.c
> index 63ee03d..75a5574 100644
> --- a/fs/xfs/libxfs/xfs_dir2_node.c
> +++ b/fs/xfs/libxfs/xfs_dir2_node.c
> @@ -2235,6 +2235,9 @@ xfs_dir2_node_trim_free(
>  
>  	dp = args->dp;
>  	tp = args->trans;
> +
> +	*rvalp = 0;
> +
>  	/*
>  	 * Read the freespace block.
>  	 */
> @@ -2255,7 +2258,6 @@ xfs_dir2_node_trim_free(
>  	 */
>  	if (freehdr.nused > 0) {
>  		xfs_trans_brelse(tp, bp);
> -		*rvalp = 0;
>  		return 0;
>  	}
>  	/*
> -- 
> 2.1.4
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos

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

      reply	other threads:[~2016-03-11 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11  9:42 [PATCH] xfs: always set rvalp in xfs_dir2_node_trim_free Christoph Hellwig
2016-03-11 11:05 ` Carlos Maiolino [this message]

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=20160311110554.GA3163@redhat.com \
    --to=cmaiolino@redhat.com \
    --cc=hch@lst.de \
    --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