kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp
changeset 123 fc55edbf3919
parent 90 947f0dc9f7a8
child 176 af6ec97d9189
--- a/kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp	Fri Apr 23 22:14:19 2010 +0100
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp	Fri Apr 23 22:20:31 2010 +0100
@@ -656,6 +656,15 @@
 		}
 
 	// Store the device, blocking any other devices from installing.
+	// unless the device is a media extension device
+	if(aDevice->iType & DPagingDevice::EMediaExtension)
+		{
+		delete iSwapManager;
+		iSwapManager = NULL;
+		TAny* null = 0;
+		__e32_atomic_store_ord_ptr(&iDevice, null);
+		}
+
 	if (!NKern::CompareAndSwap((TAny*&)iDevice, (TAny*)NULL, (TAny*)aDevice))
 		{// Data paging device already installed.
 		__KTRACE_OPT2(KPAGING,KBOOT,Kern::Printf("**** Attempt to install more than one data paging device !!!!!!!! ****"));