Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[sfrench/cifs-2.6.git] / fs / btrfs / disk-io.c
index d7a7315bd031a095c4f9f405afbb2b096a1e6f3e..8f1d44ba332f487aa42e3291daa63e45b04d44e0 100644 (file)
@@ -1275,8 +1275,10 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root,
        root->commit_root = btrfs_root_node(root);
        BUG_ON(!root->node);
 out:
-       if (location->objectid != BTRFS_TREE_LOG_OBJECTID)
+       if (location->objectid != BTRFS_TREE_LOG_OBJECTID) {
                root->ref_cows = 1;
+               btrfs_check_and_init_root_item(&root->root_item);
+       }
 
        return root;
 }