Skip to content

Commit d05e464

Browse files
josefbacikkdave
authored andcommitted
btrfs: rename btrfs_space_info_add_old_bytes
This name doesn't really fit with how the space reservation stuff works now, rename it to btrfs_space_info_free_bytes_may_use so it's clear what the function is doing. Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent def936e commit d05e464

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

fs/btrfs/block-rsv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info,
5454
spin_unlock(&dest->lock);
5555
}
5656
if (num_bytes)
57-
btrfs_space_info_add_old_bytes(fs_info, space_info,
58-
num_bytes);
57+
btrfs_space_info_free_bytes_may_use(fs_info,
58+
space_info,
59+
num_bytes);
5960
}
6061
if (qgroup_to_release_ret)
6162
*qgroup_to_release_ret = qgroup_to_release;

fs/btrfs/delayed-ref.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void btrfs_migrate_to_delayed_refs_rsv(struct btrfs_fs_info *fs_info,
158158
trace_btrfs_space_reservation(fs_info, "delayed_refs_rsv",
159159
0, num_bytes, 1);
160160
if (to_free)
161-
btrfs_space_info_add_old_bytes(fs_info,
161+
btrfs_space_info_free_bytes_may_use(fs_info,
162162
delayed_refs_rsv->space_info, to_free);
163163
}
164164

fs/btrfs/space-info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ int btrfs_reserve_metadata_bytes(struct btrfs_root *root,
129129
void btrfs_try_granting_tickets(struct btrfs_fs_info *fs_info,
130130
struct btrfs_space_info *space_info);
131131

132-
static inline void btrfs_space_info_add_old_bytes(
132+
static inline void btrfs_space_info_free_bytes_may_use(
133133
struct btrfs_fs_info *fs_info,
134134
struct btrfs_space_info *space_info,
135135
u64 num_bytes)

0 commit comments

Comments
 (0)