FsRtlTeardownPerFileContexts - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntifs.h

VOID FsRtlTeardownPerFileContexts(
  [in] PVOID *PerFileContextPointer
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-fsrtlteardownperfilecontexts)

FsRtlTeardownPerFileContexts function

Description

File systems call theFsRtlTeardownPerFileContexts routine to free FSRTL_PER_FILE_CONTEXT objects that are associated with a file control block (FCB) structure.

Parameters

PerFileContextPointer [in]

A pointer to an opaque pointer that identifies the per file context structure. To retrieve this pointer from a file object, use the FsRtlGetPerFileContextPointer macro.

Remarks

This routine calls the FreeCallback routine specified in the FSRTL_PER_FILE_CONTEXT object. The FreeCallback routine has to deallocate the FSRTL_PER_FILE_CONTEXT structure and the associated context.

To avoid conflicts in synchronization, the FsRtlTeardownPerFileContexts routine releases the lock for the per file context objects before calling FreeCallback. This avoids blocking access to the to the per file context objects by the filter for its own list operations, such as removal with FsRtlRemovePerFileContext.

See also

FSRTL_PER_FILE_CONTEXT

PFREE_FUNCTION

Tracking Per-File Context in a Legacy File System Filter Driver