Deleted Added
full compact
34c34
< * $FreeBSD: head/sys/fs/devfs/devfs_vfsops.c 160425 2006-07-17 09:07:02Z phk $
---
> * $FreeBSD: head/sys/fs/devfs/devfs_vfsops.c 162398 2006-09-18 13:23:08Z kib $
79a80
> fmp->dm_holdcnt = 1;
106a108,114
> void
> devfs_unmount_final(struct devfs_mount *fmp)
> {
> sx_destroy(&fmp->dm_lock);
> free(fmp, M_DEVFS);
> }
>
112a121,122
> int hold;
> u_int idx;
114a125,126
> KASSERT(fmp->dm_mount != NULL,
> ("devfs_unmount unmounted devfs_mount"));
122c134,135
< sx_xunlock(&fmp->dm_lock);
---
> fmp->dm_mount = NULL;
> hold = --fmp->dm_holdcnt;
124,126c137,141
< sx_destroy(&fmp->dm_lock);
< free_unr(devfs_unr, fmp->dm_idx);
< free(fmp, M_DEVFS);
---
> idx = fmp->dm_idx;
> sx_xunlock(&fmp->dm_lock);
> free_unr(devfs_unr, idx);
> if (hold == 0)
> devfs_unmount_final(fmp);
139a155
> sx_xlock(&dmp->dm_lock);