btrfs: remove BUG_ON from __tree_mod_log_insert
authorDavid Sterba <dsterba@suse.com>
Tue, 14 Feb 2017 16:33:27 +0000 (17:33 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 28 Feb 2017 13:27:11 +0000 (14:27 +0100)
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>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c

index 1192bc7d2ee782c1c915ba71aa771e57762b7d06..2c3c943bfcdc8d24b63be190f33d8abf9f800f75 100644 (file)
@@ -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;