1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Call g_waitidle() before every check the list of holds is empty.

Suggested by:	phk
This commit is contained in:
Pawel Jakub Dawidek 2005-04-19 21:44:44 +00:00
parent e68792740e
commit f163441e7e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145304

View File

@ -1041,15 +1041,22 @@ root_mount_wait(void)
{
struct root_hold_token *h;
mtx_lock(&mountlist_mtx);
while (!LIST_EMPTY(&root_holds)) {
for (;;) {
DROP_GIANT();
g_waitidle();
PICKUP_GIANT();
mtx_lock(&mountlist_mtx);
if (LIST_EMPTY(&root_holds)) {
mtx_unlock(&mountlist_mtx);
break;
}
printf("Root mount waiting for:");
LIST_FOREACH(h, &root_holds, list)
printf(" %s", h->who);
printf("\n");
msleep(&root_holds, &mountlist_mtx, PZERO, "roothold", hz);
msleep(&root_holds, &mountlist_mtx, PZERO | PDROP, "roothold",
hz);
}
mtx_unlock(&mountlist_mtx);
}
static void
@ -1189,9 +1196,6 @@ vfs_mountroot(void)
struct mount *mp;
root_mount_wait();
DROP_GIANT();
g_waitidle();
PICKUP_GIANT();
mp = devfs_first();