diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-11-06 13:32:09 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 16:34:23 +0300 |
commit | dc058f5fda091abcdccc2487b48dbbc1cdde98d0 (patch) | |
tree | 133812c25ea6567ad00d17d9c26b0a02b698e1f6 /tools/perf/scripts/python/task-analyzer.py | |
parent | 722d343f12a626c9aee8844f5bf19a107d9a1067 (diff) | |
download | linux-dc058f5fda091abcdccc2487b48dbbc1cdde98d0.tar.xz |
btrfs: send: check for dead send root under critical section
We're checking if the send root is dead without the protection of the
root's root_item_lock spinlock, which is what protects the root's flags.
The inverse, setting the dead flag on a root, is done under the protection
of that lock, at btrfs_delete_subvolume(). Also checking and updating the
root's send_in_progress counter is supposed to be done in the same
critical section as checking for or setting the root dead flag, so that
these operations are done atomically as a single step (which is correctly
done by btrfs_delete_subvolume()).
So fix this by checking if the send root is dead in the same critical
section that updates the send_in_progress counter, which is protected by
the root's root_item_lock spinlock.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
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