summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
authorGu Jinxiang <gujx@cn.fujitsu.com>2018-01-26 15:26:00 +0800
committerDavid Sterba <dsterba@suse.com>2018-02-02 16:01:56 +0100
commit26072f584d347ef2d471c02fbe27dbfedd606ac4 (patch)
treec9b94490710d5eefdc23db5e3925d622b198387f /volumes.c
parentc449c391f5ec88e903f7a6b82bb3fc55f261c35b (diff)
btrfs-progs: Use fs_info instead of root for BTRFS_LEAF_DATA_SIZE
Do a cleanup. Also make it consistent with kernel. Use fs_info instead of root for BTRFS_LEAF_DATA_SIZE, since maybe in some situation we do not know root, but just know fs_info. Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/volumes.c b/volumes.c
index 5487367..edad367 100644
--- a/volumes.c
+++ b/volumes.c
@@ -826,7 +826,7 @@ error:
return ret;
}
-#define BTRFS_MAX_DEVS(r) ((BTRFS_LEAF_DATA_SIZE(r) \
+#define BTRFS_MAX_DEVS(r) ((BTRFS_LEAF_DATA_SIZE(r->fs_info) \
- sizeof(struct btrfs_item) \
- sizeof(struct btrfs_chunk)) \
/ sizeof(struct btrfs_stripe) + 1)