diff options
| author | Jiasheng Jiang <jiashengjiangcool@gmail.com> | 2026-01-14 14:44:50 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-04-07 18:55:52 +0200 |
| commit | 08ef56661f69d40081ef782cd6a162bb0777af74 (patch) | |
| tree | 82ffc9319c5fbd965f4a4b89746a57dc4c43b074 /tools/perf/scripts/python | |
| parent | 6141abb7f18f381d879d98f6c200494f14e502a0 (diff) | |
btrfs: zoned: remove redundant space_info lock and variable in do_allocation_zoned()
In do_allocation_zoned(), the code acquires space_info->lock before
block_group->lock. However, the critical section does not access or
modify any members of the space_info structure. Thus, the lock is
redundant as it provides no necessary synchronization here.
This change simplifies the locking logic and aligns the function with
other zoned paths, such as __btrfs_add_free_space_zoned(), which only
rely on block_group->lock. Since the 'space_info' local variable is
no longer used after removing the lock calls, it is also removed.
Removing this unnecessary lock reduces contention on the global
space_info lock, improving concurrency in the zoned allocation path.
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
