diff options
author | 2024-11-06 11:26:07 +0000 | |
---|---|---|
committer | 2024-11-11 14:34:23 +0100 | |
commit | e82c936293aafb4f33b153c684c37291b3eed377 (patch) | |
tree | 28cd75943c5dbf781ef5728eb69109bbb0dea4fc /scripts/gdb/linux/utils.py | |
parent | btrfs: send: check for dead send root under critical section (diff) | |
download | wireguard-linux-e82c936293aafb4f33b153c684c37291b3eed377.tar.xz wireguard-linux-e82c936293aafb4f33b153c684c37291b3eed377.zip |
btrfs: send: check for read-only send root under critical section
We're checking if the send root is read-only without being under the
protection of the root's root_item_lock spinlock, which is what protects
the root's flags when clearing the read-only flag, done at
btrfs_ioctl_subvol_setflags(). Furthermore, it should be done in the
same critical section that increments the root's send_in_progress counter,
as btrfs_ioctl_subvol_setflags() clears the read-only flag in the same
critical section that checks the counter's value.
So fix this by moving the read-only check under the critical section
delimited by the root's root_item_lock which also increments the root's
send_in_progress counter.
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 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions