Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL
btrfs inialize rb trees in quite a number of places by settin rb_node =
NULL; The problem with this is that 17d9ddc72f in the
linux-next tree adds a new field to that struct which needs to be NULL for
the new rbtree library code to work properly. This patch uses RB_ROOT as
the intializer so all of the relevant fields will be NULL'd. Without the
patch I get a panic.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -69,7 +69,7 @@ static noinline int join_transaction(struct btrfs_root *root)
|
||||
cur_trans->commit_done = 0;
|
||||
cur_trans->start_time = get_seconds();
|
||||
|
||||
cur_trans->delayed_refs.root.rb_node = NULL;
|
||||
cur_trans->delayed_refs.root = RB_ROOT;
|
||||
cur_trans->delayed_refs.num_entries = 0;
|
||||
cur_trans->delayed_refs.num_heads_ready = 0;
|
||||
cur_trans->delayed_refs.num_heads = 0;
|
||||
|
||||
Reference in New Issue
Block a user