FAILED: patch "[PATCH] btrfs: fix missing error return in btrfs_drop_snapshot" failed to apply to 4.4-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
e19182c0fff451e3744c1107d98f072e7ca377a0Mon Sep 17 00:00:00 2001
From: Jeff Mahoney <[email protected]>
Date: Mon, 4 Dec 2017 13:11:45 -0500
Subject: [PATCH] btrfs: fix missing error return in btrfs_drop_snapshot
If btrfs_del_root fails in btrfs_drop_snapshot, we'll pick up the error but then return 0 anyway due to mixing err and ret.
Fixes 79787eaab4612 ("btrfs: replace many BUG_ONs with proper error handling")
Cc <[email protected]> # v3.4+
Signed-off-by Jeff Mahoney <[email protected]>
Reviewed-by David Sterba <[email protected]>
Signed-off-by David Sterba <[email protected]>
fs/btrfs/extent-tree.c +1 -0
@@ -9220,6 +9220,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, ret =btrfs_del_root (trans, fs_info, &root->root_key);if (ret) {btrfs_abort_transaction (trans, ret); + err = ret; goto out_end_trans; }