diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2019-10-29 12:39:49 +0000 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2019-11-02 19:23:06 +0100 |
commit | da4edc12ec9b647331a7491e3dbb963b453645da (patch) | |
tree | bd20d15302ca981114ea6c2f33da745ce7cb210a | |
parent | 32c3126b2f0464106d74317336b6aef1d7d5f82f (diff) | |
download | fstools-da4edc12ec9b647331a7491e3dbb963b453645da.tar.gz |
block: mount_device: skip extroot earlier
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
-rw-r--r-- | block.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |