[OpenWrt-Devel] [PATCH fstools 4/5] block: mount_device: skip extroot earlier

Yousong Zhou yszhou4tech at gmail.com
Tue Oct 29 08:39:49 EDT 2019


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 block.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/block.c b/block.c
index 15caaba..084e7fc 100644
--- a/block.c
+++ b/block.c
@@ -1087,6 +1087,10 @@ static int mount_device(struct device *dev, int type)
 		return 0;
 	}
 
+	m = dev->m;
+	if (m && m->extroot)
+		return -1;
+
 	mp = find_mount_point(pr->dev);
 	if (mp && (type != TYPE_HOTPLUG)) {
 		ULOG_ERR("%s is already mounted on %s\n", pr->dev, mp);
@@ -1094,10 +1098,6 @@ static int mount_device(struct device *dev, int type)
 		return -1;
 	}
 
-	m = dev->m;
-	if (m && m->extroot)
-		return -1;
-
 	if (type == TYPE_HOTPLUG)
 		blockd_notify(device, m, pr);
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list