From 47c694b0f4afa4fabf1a2013b9f9514a832898f7 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Fri, 30 Mar 2018 13:48:56 +0800 Subject: btrfs-progs: Unify btrfs_leaf_free_space() parameter with kernel Instead of struct btrfs_root, use struct btrfs_fs_info, since nodesize is now a per-fs setting, and with the need to pass a @root, caller don't need to wonder which root should be passed. Signed-off-by: Qu Wenruo Reviewed-by: Lu Fengqi Signed-off-by: David Sterba --- btrfs-corrupt-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'btrfs-corrupt-block.c') diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c index 59ee1b45..da0ec8c5 100644 --- a/btrfs-corrupt-block.c +++ b/btrfs-corrupt-block.c @@ -726,7 +726,7 @@ out: static void shift_items(struct btrfs_root *root, struct extent_buffer *eb) { int nritems = btrfs_header_nritems(eb); - int shift_space = btrfs_leaf_free_space(root, eb) / 2; + int shift_space = btrfs_leaf_free_space(root->fs_info, eb) / 2; int slot = nritems / 2; int i = 0; unsigned int data_end = btrfs_item_offset_nr(eb, nritems - 1); -- cgit v1.2.3