Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adaafc32 authored by Josef Bacik's avatar Josef Bacik Committed by Greg Kroah-Hartman
Browse files

btrfs: return errors from btrfs_del_csums in cleanup_ref_head



commit 856bd270dc4db209c779ce1e9555c7641ffbc88e upstream.

We are unconditionally returning 0 in cleanup_ref_head, despite the fact
that btrfs_del_csums could fail.  We need to return the error so the
transaction gets aborted properly, fix this by returning ret from
btrfs_del_csums in cleanup_ref_head.

Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
CC: stable@vger.kernel.org # 4.19+
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8299bb94
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2501,7 +2501,7 @@ static int cleanup_ref_head(struct btrfs_trans_handle *trans,
				      head->qgroup_reserved);
	btrfs_delayed_ref_unlock(head);
	btrfs_put_delayed_ref_head(head);
	return 0;
	return ret;
}

/*