kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp
changeset 109 b3a1d9898418
parent 90 947f0dc9f7a8
child 176 af6ec97d9189
--- a/kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp	Mon May 03 13:47:38 2010 +0300
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp	Fri May 14 17:13:29 2010 +0300
@@ -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 !!!!!!!! ****"));