ReactOS 0.4.17-dev-1190-g4c812f4
lockctrl.c File Reference
#include "ntfs.h"
#include <debug.h>
Include dependency graph for lockctrl.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI NtfsLockControl (_In_ PNTFS_IRP_CONTEXT IrpContext)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file lockctrl.c.

Function Documentation

◆ NtfsLockControl()

NTSTATUS NTAPI NtfsLockControl ( _In_ PNTFS_IRP_CONTEXT  IrpContext)

Definition at line 19 of file lockctrl.c.

21{
23
24 DPRINT("NtfsLockControl(%p)\n", IrpContext);
25
26 if (IrpContext->DeviceObject == NtfsGlobalData->DeviceObject)
28
29 /* Only the data of regular files can be locked */
30 if (!NtfsIsRegularFileObject(IrpContext->FileObject))
32
33 Fcb = (PNTFS_FCB)IrpContext->FileObject->FsContext;
34
35 /* FsRtl completes the IRP, or keeps it until a conflicting lock goes away */
36 IrpContext->Flags &= ~IRPCONTEXT_COMPLETE;
37
38 return FsRtlProcessFileLock(&Fcb->FileLock, IrpContext->Irp, NULL);
39}
_In_ PFCB Fcb
Definition: cdprocs.h:159
#define NULL
Definition: types.h:112
PNTFS_GLOBAL_DATA NtfsGlobalData
Definition: ntfs.c:36
#define IRPCONTEXT_COMPLETE
Definition: ntfs.h:506
struct _FCB * PNTFS_FCB
NTSTATUS NTAPI FsRtlProcessFileLock(IN PFILE_LOCK FileLock, IN PIRP Irp, IN PVOID Context OPTIONAL)
Definition: filelock.c:1156
BOOLEAN NTAPI NtfsIsRegularFileObject(_In_ PFILE_OBJECT FileObject)
Definition: fcb.c:153
#define DPRINT
Definition: sndvol32.h:73
PDEVICE_OBJECT DeviceObject
Definition: ntfs.h:175
Definition: cdstruc.h:902
FILE_LOCK FileLock
Definition: fatstruc.h:1071
PFILE_OBJECT FileObject
Definition: ntfs.h:599
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

Referenced by NtfsDispatch().