summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkfs/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mkfs/main.c b/mkfs/main.c
index 1b4cabc1..94f54d81 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1350,6 +1350,9 @@ static int cleanup_temp_chunks(struct btrfs_fs_info *fs_info,
ret = btrfs_search_slot(trans, root, &key, &path, 0, 0);
if (ret < 0)
goto out;
+ /* Don't pollute ret for >0 case */
+ if (ret > 0)
+ ret = 0;
btrfs_item_key_to_cpu(path.nodes[0], &found_key,
path.slots[0]);