FsRtlCheckLockForOplockRequest function (ntifs.h)

The FsRtlCheckLockForOplockRequest routine checks for locks within the allocation size of a file. The file lock object is checked for the presence of byte range locks that would prevent an oplock request from being granted.

Syntax

BOOLEAN FsRtlCheckLockForOplockRequest(
  [in] PFILE_LOCK     FileLock,
  [in] PLARGE_INTEGER AllocationSize
);

Parameters

[in] FileLock

The file lock that specifies locked ranges.

[in] AllocationSize

The file allocation size to check for any locked ranges.

Return value

FsRtlCheckLockForOplockRequest returns TRUE if the oplock request can be granted; otherwise it returns FALSE.

Remarks

FsRtlCheckLockForOplockRequest returns TRUE if AllocationSize = 0.

If FileLock has any pending lock requests, the check fails and FsRtlCheckLockForOplockRequest returns FALSE.

Requirements

Requirement Value
Minimum supported client Windows 8
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL