diff mbox

[v2,6/6] btrfs-progs: rescue: Fix zero-log mounted branch

Message ID 20171017091312.31045-7-wqu@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Qu Wenruo Oct. 17, 2017, 9:13 a.m. UTC
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(+)

Comments

David Sterba Oct. 26, 2017, 6:13 p.m. UTC | #1
On Tue, Oct 17, 2017 at 05:13:12PM +0800, Qu Wenruo wrote:
> 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>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);