From: Liu Bo <bo.li.liu@oracle.com>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/3] btrfs: remove BUG_ON from __tree_mod_log_insert
Date: Tue, 21 Feb 2017 21:31:23 -0800 [thread overview]
Message-ID: <20170222053123.GA1497@lim.localdomain> (raw)
In-Reply-To: <f4837430011633a26eeb2c1410d20f1f954e2395.1487614974.git.dsterba@suse.com>
On Mon, Feb 20, 2017 at 07:25:01PM +0100, David Sterba wrote:
> All callers dereference the 'tm' parameter before it gets to this
> function, the NULL check does not make much sense here.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/ctree.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index 1192bc7d2ee7..2c3c943bfcdc 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -453,8 +453,6 @@ __tree_mod_log_insert(struct btrfs_fs_info *fs_info, struct tree_mod_elem *tm)
> struct rb_node *parent = NULL;
> struct tree_mod_elem *cur;
>
> - BUG_ON(!tm);
> -
> tm->seq = btrfs_inc_tree_mod_seq(fs_info);
>
> tm_root = &fs_info->tree_mod_log;
> --
> 2.10.1
>
> --
> 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
next prev parent reply other threads:[~2017-02-22 5:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 18:24 [PATCH 0/3] Remove some BUG_ONs David Sterba
2017-02-20 18:25 ` [PATCH 1/3] btrfs: remove BUG_ON from __tree_mod_log_insert David Sterba
2017-02-22 5:31 ` Liu Bo [this message]
2017-02-20 18:25 ` [PATCH 2/3] btrfs: handle allocation error in update_dev_stat_item David Sterba
2017-02-22 5:33 ` Liu Bo
2017-02-20 18:25 ` [PATCH 3/3] btrfs: do proper error handling in btrfs_insert_xattr_item David Sterba
2017-02-22 5:39 ` Liu Bo
2017-02-28 10:41 ` 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=20170222053123.GA1497@lim.localdomain \
--to=bo.li.liu@oracle.com \
--cc=dsterba@suse.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 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.