From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 1/3] btrfs: remove BUG_ON from __tree_mod_log_insert
Date: Mon, 20 Feb 2017 19:25:01 +0100 [thread overview]
Message-ID: <f4837430011633a26eeb2c1410d20f1f954e2395.1487614974.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1487614974.git.dsterba@suse.com>
All callers dereference the 'tm' parameter before it gets to this
function, the NULL check does not make much sense here.
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
next prev parent reply other threads:[~2017-02-20 18:25 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 ` David Sterba [this message]
2017-02-22 5:31 ` [PATCH 1/3] btrfs: remove BUG_ON from __tree_mod_log_insert Liu Bo
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=f4837430011633a26eeb2c1410d20f1f954e2395.1487614974.git.dsterba@suse.com \
--to=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.