diff options
author | Qu Wenruo <wqu@suse.com> | 2018-03-30 13:48:56 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-04-24 13:00:11 +0200 |
commit | 47c694b0f4afa4fabf1a2013b9f9514a832898f7 (patch) | |
tree | 6c1ab83390cae8dfbc7dc1f9d19e851911027028 /btrfs-corrupt-block.c | |
parent | f96ca97fb451801d899650a4d03f6a96fa8c59fb (diff) |
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 <wqu@suse.com>
Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-corrupt-block.c')
-rw-r--r-- | btrfs-corrupt-block.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |