Skip to content

Commit 95a68c4

Browse files
fdmananakdave
authored andcommitted
btrfs: remove fs_info argument from __reserve_bytes()
We don't need it since we can grab fs_info from the given space_info. So remove the fs_info argument. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Anand Jain <asj@kernel.org> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 6d8138f commit 95a68c4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/btrfs/space-info.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,6 @@ static inline bool can_ticket(enum btrfs_reserve_flush_enum flush)
17031703
/*
17041704
* Try to reserve bytes from the block_rsv's space.
17051705
*
1706-
* @fs_info: the filesystem
17071706
* @space_info: space info we want to allocate from
17081707
* @orig_bytes: number of bytes we want
17091708
* @flush: whether or not we can flush to make our reservation
@@ -1715,10 +1714,10 @@ static inline bool can_ticket(enum btrfs_reserve_flush_enum flush)
17151714
* regain reservations will be made and this will fail if there is not enough
17161715
* space already.
17171716
*/
1718-
static int __reserve_bytes(struct btrfs_fs_info *fs_info,
1719-
struct btrfs_space_info *space_info, u64 orig_bytes,
1717+
static int __reserve_bytes(struct btrfs_space_info *space_info, u64 orig_bytes,
17201718
enum btrfs_reserve_flush_enum flush)
17211719
{
1720+
struct btrfs_fs_info *fs_info = space_info->fs_info;
17221721
struct work_struct *async_work;
17231722
struct reserve_ticket ticket;
17241723
u64 start_ns = 0;
@@ -1868,7 +1867,7 @@ int btrfs_reserve_metadata_bytes(struct btrfs_fs_info *fs_info,
18681867
{
18691868
int ret;
18701869

1871-
ret = __reserve_bytes(fs_info, space_info, orig_bytes, flush);
1870+
ret = __reserve_bytes(space_info, orig_bytes, flush);
18721871
if (ret == -ENOSPC) {
18731872
trace_btrfs_space_reservation(fs_info, "space_info:enospc",
18741873
space_info->flags, orig_bytes, 1);
@@ -1900,7 +1899,7 @@ int btrfs_reserve_data_bytes(struct btrfs_space_info *space_info, u64 bytes,
19001899
flush == BTRFS_RESERVE_NO_FLUSH);
19011900
ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_DATA);
19021901

1903-
ret = __reserve_bytes(fs_info, space_info, bytes, flush);
1902+
ret = __reserve_bytes(space_info, bytes, flush);
19041903
if (ret == -ENOSPC) {
19051904
trace_btrfs_space_reservation(fs_info, "space_info:enospc",
19061905
space_info->flags, bytes, 1);

0 commit comments

Comments
 (0)