diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-11-06 11:26:07 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 14:34:23 +0100 |
commit | e82c936293aafb4f33b153c684c37291b3eed377 (patch) | |
tree | 28cd75943c5dbf781ef5728eb69109bbb0dea4fc /drivers/ata/pata_marvell.c | |
parent | dc058f5fda091abcdccc2487b48dbbc1cdde98d0 (diff) |
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 'drivers/ata/pata_marvell.c')
0 files changed, 0 insertions, 0 deletions