diff options
author | Eric Paris <eparis@redhat.com> | 2010-02-23 14:43:04 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-08 16:26:50 -0500 |
commit | 6bef4d317193d3badbbfa3f3c593758ace84a629 (patch) | |
tree | 8aa9fcf3297c69033b9a9a83a27ecccaab0f9d7d /fs/btrfs/extent_io.c | |
parent | 3f6fae9559225741c91f1320090b285da1413290 (diff) |
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 17d9ddc72fb8bba0d4f678 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>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index b177ed319612..7073cbb1b2d4 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -104,8 +104,8 @@ void extent_io_exit(void) | |||
104 | void extent_io_tree_init(struct extent_io_tree *tree, | 104 | void extent_io_tree_init(struct extent_io_tree *tree, |
105 | struct address_space *mapping, gfp_t mask) | 105 | struct address_space *mapping, gfp_t mask) |
106 | { | 106 | { |
107 | tree->state.rb_node = NULL; | 107 | tree->state = RB_ROOT; |
108 | tree->buffer.rb_node = NULL; | 108 | tree->buffer = RB_ROOT; |
109 | tree->ops = NULL; | 109 | tree->ops = NULL; |
110 | tree->dirty_bytes = 0; | 110 | tree->dirty_bytes = 0; |
111 | spin_lock_init(&tree->lock); | 111 | spin_lock_init(&tree->lock); |