FsRtlOplockGetAnyBreakOwnerProcess function (ntifs.h)

FsRtlOplockGetAnyBreakOwnerProcess returns an owner of an allegedly breaking opportunistic lock (oplock).

Syntax

PEPROCESS FsRtlOplockGetAnyBreakOwnerProcess(
  POPLOCK Oplock
);

Parameters

Oplock

Pointer to the opaque oplock structure for the file. This pointer must have been initialized by a previous call to FsRtlInitializeOplock.

Return value

This method returns NULL if no owner can be found; otherwise it returns a pointer to an owner's process object (PEPROCESS).

Remarks

FsRtlOplockGetAnyBreakOwnerProcess selects an owner for the allegedly breaking oplock as follows:

  • If the oplock has an exclusive owner, FsRtlOplockGetAnyBreakOwnerProcess returns a pointer to the exclusive owner's EPROCESS.

  • If the oplock does not have an exclusive owner and the break queue is non-empty, FsRtlOplockGetAnyBreakOwnerProcess arbitrarily returns a pointer to the first EPROCESS in the queue.

  • Otherwise, FsRtlOplockGetAnyBreakOwnerProcess returns NULL.

If FsRtlOplockGetAnyBreakOwnerProcess returns non-NULL, the caller is responsible for calling ObDeferenceObject to release the reference acquired on its behalf.

FsRtlOplockGetAnyBreakOwnerProcess does not attempt to verify that a break is actually pending, or that the process it returns is indeed the owner.

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004
Header ntifs.h

See also

FsRtlInitializeOplock

ObDeferenceObject