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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 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

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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux