Author: pschweitzer
Date: Thu Jun 11 20:54:01 2015
New Revision: 68106
URL:
http://svn.reactos.org/svn/reactos?rev=68106&view=rev
Log:
[NTFS]
- Use a lookaside list for FCB allocation
- Properly delete FCB in NtfsMountVolume()
Modified:
trunk/reactos/drivers/filesystems/ntfs/fcb.c
trunk/reactos/drivers/filesystems/ntfs/fsctl.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] Thu Jun 11 20:54:01 2015
@@ -32,10 +32,6 @@
#define NDEBUG
#include <debug.h>
-/* MACROS *******************************************************************/
-
-#define TAG_FCB 'BCFI'
-
/* FUNCTIONS ****************************************************************/
static
@@ -76,7 +72,7 @@
ASSERT(Vcb);
ASSERT(Vcb->Identifier.Type == NTFS_TYPE_VCB);
- Fcb = ExAllocatePoolWithTag(NonPagedPool, sizeof(NTFS_FCB), TAG_FCB);
+ Fcb = ExAllocateFromNPagedLookasideList(&NtfsGlobalData->FcbLookasideList);
RtlZeroMemory(Fcb, sizeof(NTFS_FCB));
Fcb->Identifier.Type = NTFS_TYPE_FCB;
@@ -113,7 +109,7 @@
ExDeleteResourceLite(&Fcb->MainResource);
- ExFreePool(Fcb);
+ ExFreeToNPagedLookasideList(&NtfsGlobalData->FcbLookasideList, Fcb);
}
Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] Thu Jun 11 20:54:01 2015
@@ -524,7 +524,7 @@
ObDereferenceObject(Vcb->StreamFileObject);
if (Fcb)
- ExFreePool(Fcb);
+ NtfsDestroyFCB(Fcb);
if (Ccb)
ExFreePool(Ccb);
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] Thu Jun 11 20:54:01 2015
@@ -99,6 +99,9 @@
/* Initialize lookaside list for IRP contexts */
ExInitializeNPagedLookasideList(&NtfsGlobalData->IrpContextLookasideList,
NULL, NULL, 0, sizeof(NTFS_IRP_CONTEXT),
'PRIN', 0);
+ /* Initialize lookaside list for FCBs */
+ ExInitializeNPagedLookasideList(&NtfsGlobalData->FcbLookasideList,
+ NULL, NULL, 0, sizeof(NTFS_FCB), TAG_FCB, 0);
/* Driver can't be unloaded */
DriverObject->DriverUnload = NULL;
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Thu Jun 11 20:54:01 2015
@@ -127,6 +127,7 @@
} NTFS_CCB, *PNTFS_CCB;
#define TAG_CCB 'BCCI'
+#define TAG_FCB 'BCFI'
typedef struct
{
@@ -138,6 +139,7 @@
ULONG Flags;
FAST_IO_DISPATCH FastIoDispatch;
NPAGED_LOOKASIDE_LIST IrpContextLookasideList;
+ NPAGED_LOOKASIDE_LIST FcbLookasideList;
} NTFS_GLOBAL_DATA, *PNTFS_GLOBAL_DATA;