]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove double underscore prefix from __reserve_bytes()
authorFilipe Manana <fdmanana@suse.com>
Fri, 17 Oct 2025 16:58:23 +0000 (17:58 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:13:00 +0000 (22:13 +0100)
The use of a double underscore prefix is discouraged and we have no
justification at all for it all since there's no reserved_bytes() counter
part. So remove the prefix.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c

index 957477e5f01f95cae9f371eb1f7aa8a9e4e9328f..edeb46f1aa33c96ac7ccee266be0fab442966508 100644 (file)
@@ -67,7 +67,7 @@
  *   Assume we are unable to simply make the reservation because we do not have
  *   enough space
  *
- *   -> __reserve_bytes
+ *   -> reserve_bytes
  *     create a reserve_ticket with ->bytes set to our reservation, add it to
  *     the tail of space_info->tickets, kick async flush thread
  *
@@ -1728,8 +1728,8 @@ 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_space_info *space_info, u64 orig_bytes,
-                          enum btrfs_reserve_flush_enum flush)
+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;
@@ -1879,7 +1879,7 @@ int btrfs_reserve_metadata_bytes(struct btrfs_space_info *space_info,
 {
        int ret;
 
-       ret = __reserve_bytes(space_info, orig_bytes, flush);
+       ret = reserve_bytes(space_info, orig_bytes, flush);
        if (ret == -ENOSPC) {
                struct btrfs_fs_info *fs_info = space_info->fs_info;
 
@@ -1913,7 +1913,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(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);