btrfs-progs: handle failed search in find_search_start better

The warning can pop up frequently on a fuzzed image, the message seems
to be enough. Add a more fitting error code too.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-08-29 18:19:03 +02:00
parent 1fc20730db
commit 73de02b1c5

View File

@ -284,7 +284,7 @@ out:
if (!cache) {
printk("Unable to find block group for %llu\n",
(unsigned long long)search_start);
WARN_ON(1);
return -ENOENT;
}
return -ENOSPC;