]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: remove fs_info argument from maybe_clamp_preempt()
authorFilipe Manana <fdmanana@suse.com>
Mon, 13 Oct 2025 17:14:39 +0000 (18:14 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 20:59:11 +0000 (21:59 +0100)
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>
fs/btrfs/space-info.c

index ad7106bd669c3e4a9b4afd5e91b9d51fe9655b1a..bf542f154603e3411b06adfa56380893ec7abd0e 100644 (file)
@@ -1666,9 +1666,9 @@ static inline bool is_normal_flushing(enum btrfs_reserve_flush_enum flush)
                (flush == BTRFS_RESERVE_FLUSH_ALL_STEAL);
 }
 
-static inline void maybe_clamp_preempt(struct btrfs_fs_info *fs_info,
-                                      struct btrfs_space_info *space_info)
+static inline void maybe_clamp_preempt(struct btrfs_space_info *space_info)
 {
+       struct btrfs_fs_info *fs_info = space_info->fs_info;
        u64 ordered = percpu_counter_sum_positive(&fs_info->ordered_bytes);
        u64 delalloc = percpu_counter_sum_positive(&fs_info->delalloc_bytes);
 
@@ -1811,7 +1811,7 @@ static int __reserve_bytes(struct btrfs_fs_info *fs_info,
                                 * preemptive flushing in order to keep up with
                                 * the workload.
                                 */
-                               maybe_clamp_preempt(fs_info, space_info);
+                               maybe_clamp_preempt(space_info);
 
                                space_info->flush = true;
                                trace_btrfs_trigger_flush(fs_info,