Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 312 of file filtrctx.c.
{ PLIST_ENTRY NextEntry; PFSRTL_PER_STREAM_CONTEXT TmpPerStreamContext, PerStreamContext = NULL; if (!(AdvFcbHeader) || !(AdvFcbHeader->Flags2 & FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS)) { return NULL; } ExAcquireFastMutex(AdvFcbHeader->FastMutex); /* If list is empty, no need to browse it */ if (!IsListEmpty(&(AdvFcbHeader->FilterContexts))) { for (NextEntry = AdvFcbHeader->FilterContexts.Flink; NextEntry != &(AdvFcbHeader->FilterContexts); NextEntry = NextEntry->Flink) { /* If we don't have any criteria for search, first entry will be enough */ if (!OwnerId && !InstanceId) { PerStreamContext = (PFSRTL_PER_STREAM_CONTEXT)NextEntry; break; } /* Else, we've to find something that matches with the parameters. */ else { TmpPerStreamContext = CONTAINING_RECORD(NextEntry, FSRTL_PER_STREAM_CONTEXT, Links); if ((InstanceId && TmpPerStreamContext->InstanceId == InstanceId && TmpPerStreamContext->OwnerId == OwnerId) || (OwnerId && TmpPerStreamContext->OwnerId == OwnerId)) { PerStreamContext = TmpPerStreamContext; break; } } } /* Finally remove entry from list */ if (PerStreamContext) { RemoveEntryList(&(PerStreamContext->Links)); } } ExReleaseFastMutex(AdvFcbHeader->FastMutex); return PerStreamContext; }