g_vfs_close() wants the sx topology lock held while executing, so just

add correct locking to the operation of unmounting.
This will prevent debugging kernels from panicking if mounting a
non-hpfs partition (I'm not sure if this can be a problem with a
successful mounting operation though).

MFC: 3 days
This commit is contained in:
attilio 2008-01-07 16:51:24 +00:00
parent e828cf6934
commit be66714153

View File

@ -323,7 +323,11 @@ hpfs_mountfs(devvp, mp, td)
if (bp)
brelse (bp);
mp->mnt_data = NULL;
DROP_GIANT();
g_topology_lock();
g_vfs_close(cp, td);
g_topology_unlock();
PICKUP_GIANT();
return (error);
}
@ -353,7 +357,11 @@ hpfs_unmount(
}
vinvalbuf(hpmp->hpm_devvp, V_SAVE, td, 0, 0);
DROP_GIANT();
g_topology_lock();
g_vfs_close(hpmp->hpm_cp, td);
g_topology_unlock();
PICKUP_GIANT();
vrele(hpmp->hpm_devvp);
dprintf(("hpfs_umount: freeing memory...\n"));