diff options
author | Qu Wenruo <wqu@suse.com> | 2017-10-17 17:13:12 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-11-14 15:59:00 +0100 |
commit | 766e4ed597c4037dc344dd966a32402764f23550 (patch) | |
tree | 89c1af9ccdf7db29c3ca6ad4f4911c4cb9abfe14 | |
parent | c1e92291ee0f4248e5cd2f12dd2d79e16ad9721b (diff) |
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 <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | cmds-rescue.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |