diff options
author | Arne Jansen <sensille@gmx.net> | 2013-02-13 11:20:01 (GMT) |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-02-15 01:47:41 (GMT) |
commit | 2a745b14bc99d52c29d0c886a110321f651cf183 (patch) | |
tree | fb8634d03757d50dc56cd82fd5a6364d201bfcd1 /fs/btrfs/ctree.c | |
parent | 1a65e24b0bb7dde48cac4a2bf74d5558f9e32ba7 (diff) | |
download | linux-fsl-qoriq-2a745b14bc99d52c29d0c886a110321f651cf183.tar.xz |
Btrfs: fix crash in log replay with qgroups enabled
When replaying a log tree with qgroups enabled, tree_mod_log_rewind does a
sanity-check of the number of items against the maximum possible number.
It calculates that number with the nodesize of fs_root. Unfortunately
fs_root is not yet set at this stage. So instead use the nodesize from
tree_root, which is already initialized.
Signed-off-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index eea5da7..6eff0fa 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1222,7 +1222,7 @@ tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct extent_buffer *eb, __tree_mod_log_rewind(eb_rewin, time_seq, tm); WARN_ON(btrfs_header_nritems(eb_rewin) > - BTRFS_NODEPTRS_PER_BLOCK(fs_info->fs_root)); + BTRFS_NODEPTRS_PER_BLOCK(fs_info->tree_root)); return eb_rewin; } |