Btrfs: Properly setup root key while reading the root
authorYan Zheng <yanzheng@21cn.com>
Fri, 19 Oct 2007 13:22:56 +0000 (09:22 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:57 +0000 (11:03 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c

index 5accced..5a7e60d 100644 (file)
@@ -410,6 +410,7 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_fs_info *fs_info,
        read_extent_buffer(l, &root->root_item,
               btrfs_item_ptr_offset(l, path->slots[0]),
               sizeof(root->root_item));
+       memcpy(&root->root_key, location, sizeof(*location));
        ret = 0;
 out:
        btrfs_release_path(root, path);