Commit e82c936
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 <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent dc058f5 commit e82c936
1 file changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8133 | 8133 | | |
8134 | 8134 | | |
8135 | 8135 | | |
8136 | | - | |
| 8136 | + | |
| 8137 | + | |
| 8138 | + | |
| 8139 | + | |
| 8140 | + | |
| 8141 | + | |
8137 | 8142 | | |
8138 | 8143 | | |
8139 | 8144 | | |
8140 | 8145 | | |
8141 | 8146 | | |
8142 | 8147 | | |
8143 | 8148 | | |
8144 | | - | |
8145 | | - | |
8146 | | - | |
8147 | | - | |
8148 | | - | |
8149 | | - | |
8150 | | - | |
8151 | | - | |
8152 | | - | |
8153 | 8149 | | |
8154 | 8150 | | |
8155 | 8151 | | |
| |||
0 commit comments