From 766e4ed597c4037dc344dd966a32402764f23550 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Tue, 17 Oct 2017 17:13:12 +0800 Subject: btrfs-progs: rescue: Fix zero-log mounted branch Seems to be a typo that, in (ret > 0) branch of check_mounted(), zero-log set the return value but doesn't return. Fix it by adding back the missing return. Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba --- cmds-rescue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds-rescue.c b/cmds-rescue.c index d1bec021..4bc798d2 100644 --- a/cmds-rescue.c +++ b/cmds-rescue.c @@ -177,6 +177,7 @@ static int cmd_rescue_zero_log(int argc, char **argv) } else if (ret) { error("%s is currently mounted", devname); ret = -EBUSY; + goto out; } root = open_ctree(devname, 0, OPEN_CTREE_WRITES | OPEN_CTREE_PARTIAL); -- cgit v1.2.3