mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
btrfs: add missing sctx check in cleanup path in btrfs_ioctl_send()
Add sctx NULL check in the for loop condition of the sort_clone_roots cleanup path for consistency with the else branch. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
49ba3a3c0d
commit
f18dbadb52
|
|
@ -8250,7 +8250,7 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, const struct btrfs_ioctl_sen
|
|||
}
|
||||
|
||||
if (sort_clone_roots) {
|
||||
for (i = 0; i < sctx->clone_roots_cnt; i++) {
|
||||
for (i = 0; sctx && i < sctx->clone_roots_cnt; i++) {
|
||||
btrfs_root_dec_send_in_progress(
|
||||
sctx->clone_roots[i].root);
|
||||
btrfs_put_root(sctx->clone_roots[i].root);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user