All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Carlos Maiolino <cem@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs_repair: Fix check_refcount() error path
Date: Wed, 30 Nov 2022 08:30:12 -0800	[thread overview]
Message-ID: <Y4eFFEe1dBBjnX1n@magnolia> (raw)
In-Reply-To: <20221130142228.s3taflpvaj5bfia3@andromeda>

On Wed, Nov 30, 2022 at 03:22:28PM +0100, Carlos Maiolino wrote:
> > > > +err_loop:
> > > > +	libxfs_btree_del_cursor(bt_cur, error);
> > > > +err_bt_cur:
> > > > +	libxfs_buf_relse(agbp);
> > > > +err_pag:
> > > > +	libxfs_perag_put(pag);
> > >
> > > So I see that you fixed one of the labels so that err_pag jumps to
> > > releasing the perag pointer, but it's still the case that err_bt_cur
> > > frees the AGF buffer, not the btree cursor; and that err_loop actually
> > > frees the btree cursor.
> > 
> > Totally true. I focused on your comments regarding err_pag, and forgot to review
> > the remaining labels. I'll fix it and send a V3.
> 
> Just to avoid unnecessary new versions :)
> Are the fallowing names ok?
> 
> err_cur
> err_agf
> err_pag

Yes, those are fine.  The label names reflect whatever gets cleaned up
immediately after the label.

> Could be err_agbp too, but I'd rather be explicit this buffer belongs to the
> agf.

Agreed.

--D

> 
> > 
> > Thanks for the review.
> > 
> 
> -- 
> Carlos Maiolino

  reply	other threads:[~2022-11-30 16:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 13:14 [PATCH V2 0/2] xfsprogs: fix covscan issues cem
2022-11-28 13:14 ` [PATCH 1/2] xfs_repair: Fix check_refcount() error path cem
2022-11-28 22:09   ` Darrick J. Wong
2022-11-29 14:18     ` Carlos Maiolino
2022-11-30 14:22       ` Carlos Maiolino
2022-11-30 16:30         ` Darrick J. Wong [this message]
2022-11-28 13:14 ` [PATCH 2/2] xfs_repair: Fix rmaps_verify_btree() " cem
  -- strict thread matches above, loose matches on Subject: below --
2022-12-01  9:34 [PATCH V3 0/2] xfsprogs: fix covscan issues cem
2022-12-01  9:34 ` [PATCH 1/2] xfs_repair: Fix check_refcount() error path cem
2022-12-01 15:33   ` Darrick J. Wong
2022-09-02 13:43 [PATCH 0/2] xfsprogs: fix covscan issues Carlos Maiolino
2022-09-02 13:43 ` [PATCH 1/2] xfs_repair: Fix check_refcount() error path Carlos Maiolino
2022-09-02 20:48   ` Darrick J. Wong
2022-09-05  7:05     ` Carlos Maiolino
2022-11-09 11:28       ` Carlos Maiolino
2022-11-09 16:10         ` Darrick J. Wong

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=Y4eFFEe1dBBjnX1n@magnolia \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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.