summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorBoris Burkov <boris@bur.io>2025-03-06 02:04:03 +0300
committerDavid Sterba <dsterba@suse.com>2025-03-18 22:35:51 +0300
commit7cbce3cb4c5cfffd8b08f148e2136afc1ec1ba94 (patch)
tree28e85d2da7cf2a86b9e3186b9a1e53853d2f54dd /tools/perf/scripts/python/task-analyzer.py
parent895c6721d310c036dcfebb5ab845822229fa35eb (diff)
downloadlinux-7cbce3cb4c5cfffd8b08f148e2136afc1ec1ba94.tar.xz
btrfs: explicitly ref count block_group on new_bgs list
All other users of the bg_list list_head increment the refcount when adding to a list and decrement it when deleting from the list. Just for the sake of uniformity and to try to avoid refcounting bugs, do it for this list as well. This does not fix any known ref-counting bug, as the reference belongs to a single task (trans_handle is not shared and this represents trans_handle->new_bgs linkage) and will not lose its original refcount while that thread is running. And BLOCK_GROUP_FLAG_NEW protects against ref-counting errors "moving" the block group to the unused list without taking a ref. With that said, I still believe it is simpler to just hold the extra ref count for this list user as well. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Boris Burkov <boris@bur.io> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions