From: David Sterba Date: Wed, 29 Apr 2015 14:48:04 +0000 (+0200) Subject: btrfs-progs: restore: don't misreport errors from search_dir X-Git-Tag: upstream/4.16.1~2287 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=630a917aa1369d39f0f3311b2437bd97ff05c057;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: restore: don't misreport errors from search_dir The logic around return value has changed in the metadata restore patches. The return value from btrfs_search_slot may remain non-zero and is returned. This is incorrectly interpreted as an error. Signed-off-by: David Sterba --- diff --git a/cmds-restore.c b/cmds-restore.c index 8cf7a1f..e1411e9 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -812,6 +812,8 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key, goto out; } + ret = 0; + leaf = path->nodes[0]; while (!leaf) { if (verbose > 1)