All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Remove never reached code
Date: Wed, 12 Jul 2017 16:50:00 +0200	[thread overview]
Message-ID: <20170712145000.GD2866@twin.jikos.cz> (raw)
In-Reply-To: <1499840038-16089-1-git-send-email-nborisov@suse.com>

The subject is too generic, and the changelog could say something about
the btrfs_panic semantics. Otherwise the change is ok, previously there
was just BUG_ON, then if -> btrfs_panic and after moving the kfree after
the print, the return has been added, but this is just redundant.

On Wed, Jul 12, 2017 at 09:13:58AM +0300, Nikolay Borisov wrote:
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  fs/btrfs/relocation.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 65661d1aae4e..1a532bb72eab 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -1308,8 +1308,6 @@ static int __must_check __add_reloc_root(struct btrfs_root *root)
>  		btrfs_panic(fs_info, -EEXIST,
>  			    "Duplicate root found for start=%llu while inserting into relocation tree",
>  			    node->bytenr);
> -		kfree(node);
> -		return -EEXIST;
>  	}
>  
>  	list_add_tail(&root->root_list, &rc->reloc_roots);
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-07-12 14:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  6:13 [PATCH] btrfs: Remove never reached code Nikolay Borisov
2017-07-12 14:50 ` David Sterba [this message]
2017-07-13 11:11   ` [PATCH v2] btrfs: Remove never reached error handling code in __add_reloc_root Nikolay Borisov
2017-07-21 16:02     ` David Sterba

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=20170712145000.GD2866@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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.