kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp
branchRCL_3
changeset 42 a179b74831c9
parent 28 5b5d147c7838
child 43 c1f20ce4abcf
--- a/kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp	Thu Jul 15 20:11:42 2010 +0300
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/mdatapaging.cpp	Thu Aug 19 11:14:22 2010 +0300
@@ -797,6 +797,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 !!!!!!!! ****"));