Applied the unmount() fix from NewOS change 1906.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5906 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-01-05 01:03:14 +00:00
parent 5e821a67af
commit 11e38cc1d9

View File

@ -3386,8 +3386,9 @@ fs_unmount(char *path, bool kernel)
goto err;
}
/* grab the vnode master mutex to keep someone from creating a vnode
while we're figuring out if we can continue */
/* grab the vnode master mutex to keep someone from creating
* a vnode while we're figuring out if we can continue
*/
mutex_lock(&sVnodeMutex);
/* simulate the root vnode having it's refcount decremented */
@ -3415,6 +3416,9 @@ fs_unmount(char *path, bool kernel)
}
mount->unmounting = true;
/* add 2 back to the root vnode's ref */
mount->root_vnode->ref_count += 2;
mutex_unlock(&sVnodeMutex);
mount->covers_vnode->covered_by = NULL;