From e0481f928ec4346f39d72ee5951330448e7d5234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 21 Aug 2005 13:45:15 +0000 Subject: [PATCH] Now marks a partition unmounted on unmount - that allows a volume to be remounted as often as you like. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14036 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/fs/vfs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index 675342bd0d..4129d59073 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -5154,8 +5154,11 @@ fs_unmount(char *path, uint32 flags, bool kernel) // release the file system put_file_system(mount->fs); - // dereference the partition + // dereference the partition and mark it unmounted if (partition) { + partition->SetVolumeID(-1); + partition->SetMountCookie(NULL); + if (mount->owns_file_device) KDiskDeviceManager::Default()->DeleteFileDevice(partition->ID()); partition->Unregister();