mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
David Sterba
parent
09d0f28531
commit
30b87a2319
@@ -1703,7 +1703,6 @@ static inline bool can_ticket(enum btrfs_reserve_flush_enum flush)
|
||||
/*
|
||||
* Try to reserve bytes from the block_rsv's space.
|
||||
*
|
||||
* @fs_info: the filesystem
|
||||
* @space_info: space info we want to allocate from
|
||||
* @orig_bytes: number of bytes we want
|
||||
* @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)
|
||||
* regain reservations will be made and this will fail if there is not enough
|
||||
* space already.
|
||||
*/
|
||||
static int __reserve_bytes(struct btrfs_fs_info *fs_info,
|
||||
struct btrfs_space_info *space_info, u64 orig_bytes,
|
||||
static int __reserve_bytes(struct btrfs_space_info *space_info, u64 orig_bytes,
|
||||
enum btrfs_reserve_flush_enum flush)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = space_info->fs_info;
|
||||
struct work_struct *async_work;
|
||||
struct reserve_ticket ticket;
|
||||
u64 start_ns = 0;
|
||||
@@ -1868,7 +1867,7 @@ int btrfs_reserve_metadata_bytes(struct btrfs_fs_info *fs_info,
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = __reserve_bytes(fs_info, space_info, orig_bytes, flush);
|
||||
ret = __reserve_bytes(space_info, orig_bytes, flush);
|
||||
if (ret == -ENOSPC) {
|
||||
trace_btrfs_space_reservation(fs_info, "space_info:enospc",
|
||||
space_info->flags, orig_bytes, 1);
|
||||
@@ -1900,7 +1899,7 @@ int btrfs_reserve_data_bytes(struct btrfs_space_info *space_info, u64 bytes,
|
||||
flush == BTRFS_RESERVE_NO_FLUSH);
|
||||
ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_DATA);
|
||||
|
||||
ret = __reserve_bytes(fs_info, space_info, bytes, flush);
|
||||
ret = __reserve_bytes(space_info, bytes, flush);
|
||||
if (ret == -ENOSPC) {
|
||||
trace_btrfs_space_reservation(fs_info, "space_info:enospc",
|
||||
space_info->flags, bytes, 1);
|
||||
|
||||
Reference in New Issue
Block a user