For completeness sake add code to btrfs_read_fs_root so that it can
handle the freespace tree.

Signed-off-by: Nikolay Borisov <[email protected]>
---
 disk-io.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/disk-io.c b/disk-io.c
index 8da6e3ce5fc8..9ad826b83b3e 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -664,6 +664,9 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info 
*fs_info,
        if (location->objectid == BTRFS_QUOTA_TREE_OBJECTID)
                return fs_info->quota_enabled ? fs_info->quota_root :
                                ERR_PTR(-ENOENT);
+       if (location->objectid == BTRFS_FREE_SPACE_TREE_OBJECTID)
+        return fs_info->free_space_root ? fs_info->free_space_root :
+                                                  ERR_PTR(-ENOENT);
 
        BUG_ON(location->objectid == BTRFS_TREE_RELOC_OBJECTID ||
               location->offset != (u64)-1);
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to