linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz
Subject: [PATCH v2 6/6] btrfs-progs: rescue: Fix zero-log mounted branch
Date: Tue, 17 Oct 2017 17:13:12 +0800	[thread overview]
Message-ID: <20171017091312.31045-7-wqu@suse.com> (raw)
In-Reply-To: <20171017091312.31045-1-wqu@suse.com>

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>
---
 cmds-rescue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmds-rescue.c b/cmds-rescue.c
index 5b51952cdc10..c40088ad374e 100644
--- a/cmds-rescue.c
+++ b/cmds-rescue.c
@@ -178,6 +178,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);
-- 
2.14.2


  parent reply	other threads:[~2017-10-17  9:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  9:13 [PATCH v2 0/6] Btrfs-progs: rescue: To fix device related Qu Wenruo
2017-10-17  9:13 ` [PATCH v2 1/6] btrfs-progs: Introduce function to fix unaligned device size Qu Wenruo
2017-10-17  9:13 ` [PATCH v2 2/6] btrfs-progs: Introduce function to fix super block total bytes Qu Wenruo
2017-10-17  9:13 ` [PATCH v2 3/6] btrfs-progs: rescue: Introduce fix-device-size Qu Wenruo
2017-10-17  9:13 ` [PATCH v2 4/6] btrfs-progs: check: Also check and repair unalignment/mismatch device and super size Qu Wenruo
2017-10-17  9:13 ` [PATCH v2 5/6] btrfs-progs: test/fsck: Add test case image for --fix-dev-size Qu Wenruo
2017-10-17  9:13 ` Qu Wenruo [this message]
2017-10-26 18:13   ` [PATCH v2 6/6] btrfs-progs: rescue: Fix zero-log mounted branch David Sterba
2017-10-17 13:05 ` [PATCH v2 0/6] Btrfs-progs: rescue: To fix device related Nikolay Borisov
2017-10-27 16:16 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171017091312.31045-7-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).