btrfs: change root to fs_info for btrfs_reserve_metadata_bytes
authorJosef Bacik <josef@toxicpanda.com>
Tue, 9 Nov 2021 15:12:07 +0000 (10:12 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Jan 2022 14:09:45 +0000 (15:09 +0100)
commit9270501c163b67f48fd5fb2f98b1b48d6530f460
treedd51bafe37ebb37747c3f6ce0fb718ee0507f05f
parent54230013d41fb6eb231755dfec8615db9dcfb020
btrfs: change root to fs_info for btrfs_reserve_metadata_bytes

We used to need the root for btrfs_reserve_metadata_bytes to check the
orphan cleanup state, but we no longer need that, we simply need the
fs_info.  Change btrfs_reserve_metadata_bytes() to use the fs_info, and
change both btrfs_block_rsv_refill() and btrfs_block_rsv_add() to do the
same as they simply call btrfs_reserve_metadata_bytes() and then
manipulate the block_rsv that is being used.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
13 files changed:
fs/btrfs/block-group.c
fs/btrfs/block-rsv.c
fs/btrfs/block-rsv.h
fs/btrfs/delalloc-space.c
fs/btrfs/delayed-inode.c
fs/btrfs/delayed-ref.c
fs/btrfs/inode.c
fs/btrfs/props.c
fs/btrfs/relocation.c
fs/btrfs/root-tree.c
fs/btrfs/space-info.c
fs/btrfs/space-info.h
fs/btrfs/transaction.c