aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/disk-io.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0d50d49d990a..55d9d188e693 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1783,6 +1783,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
1783 btrfs_super_chunk_root(disk_super), 1783 btrfs_super_chunk_root(disk_super),
1784 blocksize, generation); 1784 blocksize, generation);
1785 BUG_ON(!chunk_root->node); 1785 BUG_ON(!chunk_root->node);
1786 if (!test_bit(EXTENT_BUFFER_UPTODATE, &chunk_root->node->bflags)) {
1787 printk(KERN_WARNING "btrfs: failed to read chunk root on %s\n",
1788 sb->s_id);
1789 goto fail_chunk_root;
1790 }
1786 btrfs_set_root_node(&chunk_root->root_item, chunk_root->node); 1791 btrfs_set_root_node(&chunk_root->root_item, chunk_root->node);
1787 chunk_root->commit_root = btrfs_root_node(chunk_root); 1792 chunk_root->commit_root = btrfs_root_node(chunk_root);
1788 1793
@@ -1810,6 +1815,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
1810 blocksize, generation); 1815 blocksize, generation);
1811 if (!tree_root->node) 1816 if (!tree_root->node)
1812 goto fail_chunk_root; 1817 goto fail_chunk_root;
1818 if (!test_bit(EXTENT_BUFFER_UPTODATE, &tree_root->node->bflags)) {
1819 printk(KERN_WARNING "btrfs: failed to read tree root on %s\n",
1820 sb->s_id);
1821 goto fail_tree_root;
1822 }
1813 btrfs_set_root_node(&tree_root->root_item, tree_root->node); 1823 btrfs_set_root_node(&tree_root->root_item, tree_root->node);
1814 tree_root->commit_root = btrfs_root_node(tree_root); 1824 tree_root->commit_root = btrfs_root_node(tree_root);
1815 1825