From: Omar Sandoval <osandov@osandov.com>
To: Harinath Nampally <harinath922@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] code cleanup
Date: Sun, 14 Aug 2016 23:33:23 -0700 [thread overview]
Message-ID: <20160815063323.GA19212@vader> (raw)
In-Reply-To: <1471205491-27411-1-git-send-email-harinath922@gmail.com>
On Sun, Aug 14, 2016 at 04:11:31PM -0400, Harinath Nampally wrote:
> This patch checks ret value and jumps to clean up in case of
> btrs_add_systme_chunk call fails
>
> Signed-off-by: Harinath Nampally <harinath922@gmail.com>
> ---
> fs/btrfs/volumes.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 366b335..fedb301 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4880,12 +4880,15 @@ int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans,
>
> ret = btrfs_insert_item(trans, chunk_root, &key, chunk, item_size);
> if (ret == 0 && map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
> - /*
> - * TODO: Cleanup of inserted chunk root in case of
> - * failure.
> - */
> ret = btrfs_add_system_chunk(chunk_root, &key, chunk,
> item_size);
> + if (ret) {
> + /*
> + * Cleanup of inserted chunk root in case of
> + * failure.
> + */
> + goto out;
> + }
> }
>
> out:
NAK. This patch doesn't do anything. That's just jumping to the exact
same location that we were previously returning to anyways.
--
Omar
prev parent reply other threads:[~2016-08-15 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-14 20:11 [PATCH] code cleanup Harinath Nampally
2016-08-15 6:33 ` Omar Sandoval [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=20160815063323.GA19212@vader \
--to=osandov@osandov.com \
--cc=harinath922@gmail.com \
--cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).