The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] btrfs: Add missing sctx check in cleanup path
@ 2026-07-07  9:16 Hongling Zeng
  2026-07-13 18:35 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Hongling Zeng @ 2026-07-07  9:16 UTC (permalink / raw)
  To: clm, dsterba; +Cc: linux-btrfs, linux-kernel, zhongling0719, Hongling Zeng

Add sctx NULL check in the sort_clone_roots cleanup path for
consistency with other cleanup paths in the function.

Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
---
 fs/btrfs/send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 3ae480c7474b..2d81fac03a3d 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -8250,7 +8250,7 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, const struct btrfs_ioctl_sen
 		free_orphan_dir_info(sctx, odi);
 	}
 
-	if (sort_clone_roots) {
+	if (sctx && sort_clone_roots) {
 		for (i = 0; i < sctx->clone_roots_cnt; i++) {
 			btrfs_root_dec_send_in_progress(
 					sctx->clone_roots[i].root);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-14  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07  9:16 [PATCH] btrfs: Add missing sctx check in cleanup path Hongling Zeng
2026-07-13 18:35 ` David Sterba
2026-07-14  1:20   ` Hongling Zeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox