Skip to content

Commit e19182c

Browse files
jeffmahoneykdave
authored andcommitted
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: 79787ea ("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]>
1 parent 692826b commit e19182c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/extent-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9220,6 +9220,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
92209220
ret = btrfs_del_root(trans, fs_info, &root->root_key);
92219221
if (ret) {
92229222
btrfs_abort_transaction(trans, ret);
9223+
err = ret;
92239224
goto out_end_trans;
92249225
}
92259226

0 commit comments

Comments
 (0)