Author: pschweitzer
Date: Tue Aug 26 05:45:00 2008
New Revision: 35664
URL:
http://svn.reactos.org/svn/reactos?rev=35664&view=rev
Log:
Implemented FsRtlTeardownPerStreamContexts
Modified:
branches/pierre-fsd/ntoskrnl/fsrtl/filtrctx.c
Modified: branches/pierre-fsd/ntoskrnl/fsrtl/filtrctx.c
URL:
http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/filtr…
==============================================================================
--- branches/pierre-fsd/ntoskrnl/fsrtl/filtrctx.c [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/fsrtl/filtrctx.c [iso-8859-1] Tue Aug 26 05:45:00 2008
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/filtrctx.c
* PURPOSE: File Stream Filter Context support for File System Drivers
- * PROGRAMMERS: None.
+ * PROGRAMMERS: Pierre Schweitzer (heis_spiter(a)hotmail.com)
*/
/* INCLUDES ******************************************************************/
@@ -203,12 +203,24 @@
}
/*
- * @unimplemented
+ * @implemented
*/
VOID
NTAPI
FsRtlTeardownPerStreamContexts(IN PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader)
{
- KEBUGCHECK(0);
-}
-
+ PLIST_ENTRY NextEntry;
+ PFSRTL_PER_STREAM_CONTEXT PerStreamContext;
+
+ ExAcquireFastMutex(AdvancedHeader->FastMutex);
+ for (NextEntry = AdvancedHeader->FilterContexts.Flink;
+ NextEntry != &(AdvancedHeader->FilterContexts);
+ NextEntry = NextEntry->Flink)
+ {
+ PerStreamContext = CONTAINING_RECORD(NextEntry, FSRTL_PER_STREAM_CONTEXT,
Links);
+ (*PerStreamContext->FreeCallback)(PerStreamContext);
+ }
+ InitializeListHead(&(AdvancedHeader->FilterContexts));
+ ExReleaseFastMutex(AdvancedHeader->FastMutex);
+}
+