From: Greg Kroah-Hartman Date: Tue, 8 Apr 2025 09:09:48 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v5.4.292~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0695bc7df4ec388f70cfedab3d6b0cb7dc5598f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: btrfs-handle-errors-from-btrfs_dec_ref-properly.patch --- diff --git a/queue-5.10/btrfs-handle-errors-from-btrfs_dec_ref-properly.patch b/queue-5.10/btrfs-handle-errors-from-btrfs_dec_ref-properly.patch new file mode 100644 index 0000000000..f50f4324c4 --- /dev/null +++ b/queue-5.10/btrfs-handle-errors-from-btrfs_dec_ref-properly.patch @@ -0,0 +1,36 @@ +From 5eb178f373b4f16f3b42d55ff88fc94dd95b93b1 Mon Sep 17 00:00:00 2001 +From: Josef Bacik +Date: Tue, 7 May 2024 14:12:15 -0400 +Subject: btrfs: handle errors from btrfs_dec_ref() properly + +From: Josef Bacik + +commit 5eb178f373b4f16f3b42d55ff88fc94dd95b93b1 upstream. + +In walk_up_proc() we BUG_ON(ret) from btrfs_dec_ref(). This is +incorrect, we have proper error handling here, return the error. + +Signed-off-by: Josef Bacik +Reviewed-by: David Sterba +Signed-off-by: David Sterba +Signed-off-by: Jianqi Ren +Signed-off-by: He Zhe +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/extent-tree.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/btrfs/extent-tree.c ++++ b/fs/btrfs/extent-tree.c +@@ -5240,7 +5240,10 @@ static noinline int walk_up_proc(struct + ret = btrfs_dec_ref(trans, root, eb, 1); + else + ret = btrfs_dec_ref(trans, root, eb, 0); +- BUG_ON(ret); /* -ENOMEM */ ++ if (ret) { ++ btrfs_abort_transaction(trans, ret); ++ return ret; ++ } + if (is_fstree(root->root_key.objectid)) { + ret = btrfs_qgroup_trace_leaf_items(trans, eb); + if (ret) { diff --git a/queue-5.10/series b/queue-5.10/series index a732ecd4d7..0bffc50e88 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -209,3 +209,4 @@ tty-serial-fsl_lpuart-disable-transmitter-before-cha.patch drm-amd-pm-fix-negative-array-index-read.patch drm-amd-display-skip-inactive-planes-within-modesupportandsystemconfiguration.patch ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch +btrfs-handle-errors-from-btrfs_dec_ref-properly.patch