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