ReactOS  0.4.14-dev-358-gbef841c
lockctrl.c
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1989-2000 Microsoft Corporation
4 
5 Module Name:
6 
7  LockCtrl.c
8 
9 Abstract:
10 
11  This module implements the Lock Control routines for Fat called
12  by the dispatch driver.
13 
14 
15 --*/
16 
17 #include "fatprocs.h"
18 
19 //
20 // The local debug trace level
21 //
22 
23 #define Dbg (DEBUG_TRACE_LOCKCTRL)
24 
25 #ifdef ALLOC_PRAGMA
26 #pragma alloc_text(PAGE, FatCommonLockControl)
27 #pragma alloc_text(PAGE, FatFastLock)
28 #pragma alloc_text(PAGE, FatFastUnlockAll)
29 #pragma alloc_text(PAGE, FatFastUnlockAllByKey)
30 #pragma alloc_text(PAGE, FatFastUnlockSingle)
31 #pragma alloc_text(PAGE, FatFsdLockControl)
32 #endif
33 
34 
38 NTAPI
39 FatFsdLockControl (
40  _In_ PVOLUME_DEVICE_OBJECT VolumeDeviceObject,
42  )
43 
44 /*++
45 
46 Routine Description:
47 
48  This routine implements the FSD part of Lock control operations
49 
50 Arguments:
51 
52  VolumeDeviceObject - Supplies the volume device object where the
53  file exists
54 
55  Irp - Supplies the Irp being processed
56 
57 Return Value:
58 
59  NTSTATUS - The FSD status for the IRP
60 
61 --*/
62 
63 {
65  PIRP_CONTEXT IrpContext = NULL;
66 
68 
69  PAGED_CODE();
70 
71  DebugTrace(+1, Dbg, "FatFsdLockControl\n", 0);
72 
73  //
74  // Call the common Lock Control routine, with blocking allowed if
75  // synchronous
76  //
77 
79 
81 
82  _SEH2_TRY {
83 
84  IrpContext = FatCreateIrpContext( Irp, CanFsdWait( Irp ) );
85 
86  Status = FatCommonLockControl( IrpContext, Irp );
87 
89 
90  //
91  // We had some trouble trying to perform the requested
92  // operation, so we'll abort the I/O request with
93  // the error status that we get back from the
94  // execption code
95  //
96 
97  Status = FatProcessException( IrpContext, Irp, _SEH2_GetExceptionCode() );
98  } _SEH2_END;
99 
100  if (TopLevel) { IoSetTopLevelIrp( NULL ); }
101 
103 
104  //
105  // And return to our caller
106  //
107 
108  DebugTrace(-1, Dbg, "FatFsdLockControl -> %08lx\n", Status);
109 
110  UNREFERENCED_PARAMETER( VolumeDeviceObject );
111 
112  return Status;
113 }
114 
115 
116 _Function_class_(FAST_IO_LOCK)
117 BOOLEAN
118 NTAPI
119 FatFastLock (
124  ULONG Key,
129  )
130 
131 /*++
132 
133 Routine Description:
134 
135  This is a call back routine for doing the fast lock call.
136 
137 Arguments:
138 
139  FileObject - Supplies the file object used in this operation
140 
141  FileOffset - Supplies the file offset used in this operation
142 
143  Length - Supplies the length used in this operation
144 
145  ProcessId - Supplies the process ID used in this operation
146 
147  Key - Supplies the key used in this operation
148 
149  FailImmediately - Indicates if the request should fail immediately
150  if the lock cannot be granted.
151 
152  ExclusiveLock - Indicates if this is a request for an exclusive or
153  shared lock
154 
155  IoStatus - Receives the Status if this operation is successful
156 
157 Return Value:
158 
159  BOOLEAN - TRUE if this operation completed and FALSE if caller
160  needs to take the long route.
161 
162 --*/
163 
164 {
165  BOOLEAN Results = FALSE;
166  PVCB Vcb;
167  PFCB Fcb;
168  PCCB Ccb;
169 
170  PAGED_CODE();
172 
173  DebugTrace(+1, Dbg, "FatFastLock\n", 0);
174 
175  //
176  // Decode the type of file object we're being asked to process and make
177  // sure it is only a user file open.
178  //
179 
181 
183  IoStatus->Information = 0;
184 
185  DebugTrace(-1, Dbg, "FatFastLock -> TRUE (STATUS_INVALID_PARAMETER)\n", 0);
186  return TRUE;
187  }
188 
189  //
190  // Acquire shared access to the Fcb
191  //
192 
195 
196  _SEH2_TRY {
197 
198  //
199  // We check whether we can proceed
200  // based on the state of the file oplocks.
201  //
202 
204 
205  try_return( Results = FALSE );
206  }
207 
208  //
209  // Now call the FsRtl routine to do the actual processing of the
210  // Lock request
211  //
212 
213 #ifdef _MSC_VER
214 #pragma prefast( suppress:28159, "prefast indicates this API is obsolete but it is ok for fastfat to continue using it" )
215 #endif
216  Results = FsRtlFastLock( &Fcb->Specific.Fcb.FileLock,
217  FileObject,
218  FileOffset,
219  Length,
220  ProcessId,
221  Key,
224  IoStatus,
225  NULL,
226  FALSE );
227 
228  if (Results) {
229 
230  //
231  // Set the flag indicating if Fast I/O is possible
232  //
233 
234  Fcb->Header.IsFastIoPossible = FatIsFastIoPossible( Fcb );
235  }
236 
237  try_exit: NOTHING;
238  } _SEH2_FINALLY {
239 
240  DebugUnwind( FatFastLock );
241 
242  //
243  // Release the Fcb, and return to our caller
244  //
245 
246  ExReleaseResourceLite( Fcb->Header.Resource );
248 
249  DebugTrace(-1, Dbg, "FatFastLock -> %08lx\n", Results);
250  } _SEH2_END;
251 
252  return Results;
253 }
254 
255 
256 _Function_class_(FAST_IO_UNLOCK_SINGLE)
257 BOOLEAN
258 NTAPI
259 FatFastUnlockSingle (
264  ULONG Key,
267  )
268 
269 /*++
270 
271 Routine Description:
272 
273  This is a call back routine for doing the fast unlock single call.
274 
275 Arguments:
276 
277  FileObject - Supplies the file object used in this operation
278 
279  FileOffset - Supplies the file offset used in this operation
280 
281  Length - Supplies the length used in this operation
282 
283  ProcessId - Supplies the process ID used in this operation
284 
285  Key - Supplies the key used in this operation
286 
287  Status - Receives the Status if this operation is successful
288 
289 Return Value:
290 
291  BOOLEAN - TRUE if this operation completed and FALSE if caller
292  needs to take the long route.
293 
294 --*/
295 
296 {
297  BOOLEAN Results = FALSE;
298  PVCB Vcb;
299  PFCB Fcb;
300  PCCB Ccb;
301 
302  PAGED_CODE();
304 
305  DebugTrace(+1, Dbg, "FatFastUnlockSingle\n", 0);
306 
307  IoStatus->Information = 0;
308 
309  //
310  // Decode the type of file object we're being asked to process and make sure
311  // it is only a user file open
312  //
313 
315 
317 
318  DebugTrace(-1, Dbg, "FatFastUnlockSingle -> TRUE (STATUS_INVALID_PARAMETER)\n", 0);
319  return TRUE;
320  }
321 
322  //
323  // Acquire exclusive access to the Fcb this operation can always wait
324  //
325 
327 
328  _SEH2_TRY {
329 
330  //
331  // We check whether we can proceed based on the state of the file oplocks.
332  //
333 
335 
336  try_return( Results = FALSE );
337  }
338 
339  //
340  // Now call the FsRtl routine to do the actual processing of the
341  // Lock request. The call will always succeed.
342  //
343 
344  Results = TRUE;
345  IoStatus->Status = FsRtlFastUnlockSingle( &Fcb->Specific.Fcb.FileLock,
346  FileObject,
347  FileOffset,
348  Length,
349  ProcessId,
350  Key,
351  NULL,
352  FALSE );
353 
354  //
355  // Set the flag indicating if Fast I/O is possible
356  //
357 
358  Fcb->Header.IsFastIoPossible = FatIsFastIoPossible( Fcb );
359 
360  try_exit: NOTHING;
361  } _SEH2_FINALLY {
362 
363  DebugUnwind( FatFastUnlockSingle );
364 
365  //
366  // Release the Fcb, and return to our caller
367  //
368 
370 
371  DebugTrace(-1, Dbg, "FatFastUnlockSingle -> %08lx\n", Results);
372  } _SEH2_END;
373 
374  return Results;
375 }
376 
377 
378 _Function_class_(FAST_IO_UNLOCK_ALL)
379 BOOLEAN
380 NTAPI
381 FatFastUnlockAll (
386  )
387 
388 /*++
389 
390 Routine Description:
391 
392  This is a call back routine for doing the fast unlock all call.
393 
394 Arguments:
395 
396  FileObject - Supplies the file object used in this operation
397 
398  ProcessId - Supplies the process ID used in this operation
399 
400  Status - Receives the Status if this operation is successful
401 
402 Return Value:
403 
404  BOOLEAN - TRUE if this operation completed and FALSE if caller
405  needs to take the long route.
406 
407 --*/
408 
409 {
410  BOOLEAN Results = FALSE;
411  PVCB Vcb;
412  PFCB Fcb;
413  PCCB Ccb;
414 
415  PAGED_CODE();
417 
418  DebugTrace(+1, Dbg, "FatFastUnlockAll\n", 0);
419 
420  IoStatus->Information = 0;
421 
422  //
423  // Decode the type of file object we're being asked to process and make sure
424  // it is only a user file open.
425  //
426 
428 
430 
431  DebugTrace(-1, Dbg, "FatFastUnlockAll -> TRUE (STATUS_INVALID_PARAMETER)\n", 0);
432  return TRUE;
433  }
434 
435  //
436  // Acquire exclusive access to the Fcb this operation can always wait
437  //
438 
440 
442 
443  _SEH2_TRY {
444 
445  //
446  // We check whether we can proceed based on the state of the file oplocks.
447  //
448 
450 
451  try_return( Results = FALSE );
452  }
453 
454  //
455  // Now call the FsRtl routine to do the actual processing of the
456  // Lock request. The call will always succeed.
457  //
458 
459  Results = TRUE;
460  IoStatus->Status = FsRtlFastUnlockAll( &Fcb->Specific.Fcb.FileLock,
461  FileObject,
462  ProcessId,
463  NULL );
464 
465  //
466  // Set the flag indicating if Fast I/O is possible
467  //
468 
469  Fcb->Header.IsFastIoPossible = FatIsFastIoPossible( Fcb );
470 
471  try_exit: NOTHING;
472  } _SEH2_FINALLY {
473 
474  DebugUnwind( FatFastUnlockAll );
475 
476  //
477  // Release the Fcb, and return to our caller
478  //
479 
480  ExReleaseResourceLite( (Fcb)->Header.Resource );
481 
483 
484  DebugTrace(-1, Dbg, "FatFastUnlockAll -> %08lx\n", Results);
485  } _SEH2_END;
486 
487  return Results;
488 }
489 
490 
491 _Function_class_(FAST_IO_UNLOCK_ALL_BY_KEY)
492 BOOLEAN
493 NTAPI
494 FatFastUnlockAllByKey (
497  ULONG Key,
500  )
501 
502 /*++
503 
504 Routine Description:
505 
506  This is a call back routine for doing the fast unlock all by key call.
507 
508 Arguments:
509 
510  FileObject - Supplies the file object used in this operation
511 
512  ProcessId - Supplies the process ID used in this operation
513 
514  Key - Supplies the key used in this operation
515 
516  Status - Receives the Status if this operation is successful
517 
518 Return Value:
519 
520  BOOLEAN - TRUE if this operation completed and FALSE if caller
521  needs to take the long route.
522 
523 --*/
524 
525 {
526  BOOLEAN Results = FALSE;
527  PVCB Vcb;
528  PFCB Fcb;
529  PCCB Ccb;
530 
531  PAGED_CODE();
533 
534  DebugTrace(+1, Dbg, "FatFastUnlockAllByKey\n", 0);
535 
536  IoStatus->Information = 0;
537 
538  //
539  // Decode the type of file object we're being asked to process and make sure
540  // it is only a user file open.
541  //
542 
544 
546 
547  DebugTrace(-1, Dbg, "FatFastUnlockAll -> TRUE (STATUS_INVALID_PARAMETER)\n", 0);
548  return TRUE;
549  }
550 
551  //
552  // Acquire exclusive access to the Fcb this operation can always wait
553  //
554 
556 
558 
559  _SEH2_TRY {
560 
561  //
562  // We check whether we can proceed based on the state of the file oplocks.
563  //
564 
566 
567  try_return( Results = FALSE );
568  }
569 
570  //
571  // Now call the FsRtl routine to do the actual processing of the
572  // Lock request. The call will always succeed.
573  //
574 
575  Results = TRUE;
576  IoStatus->Status = FsRtlFastUnlockAllByKey( &Fcb->Specific.Fcb.FileLock,
577  FileObject,
578  ProcessId,
579  Key,
580  NULL );
581 
582  //
583  // Set the flag indicating if Fast I/O is possible
584  //
585 
586  Fcb->Header.IsFastIoPossible = FatIsFastIoPossible( Fcb );
587 
588  try_exit: NOTHING;
589  } _SEH2_FINALLY {
590 
591  DebugUnwind( FatFastUnlockAllByKey );
592 
593  //
594  // Release the Fcb, and return to our caller
595  //
596 
597  ExReleaseResourceLite( (Fcb)->Header.Resource );
598 
600 
601  DebugTrace(-1, Dbg, "FatFastUnlockAllByKey -> %08lx\n", Results);
602  } _SEH2_END;
603 
604  return Results;
605 }
606 
607 
608 _Requires_lock_held_(_Global_critical_region_)
609 NTSTATUS
610 FatCommonLockControl (
611  IN PIRP_CONTEXT IrpContext,
612  IN PIRP Irp
613  )
614 
615 /*++
616 
617 Routine Description:
618 
619  This is the common routine for doing Lock control operations called
620  by both the fsd and fsp threads
621 
622 Arguments:
623 
624  Irp - Supplies the Irp to process
625 
626 Return Value:
627 
628  NTSTATUS - The return status for the operation
629 
630 --*/
631 
632 {
635 
637 
638  PVCB Vcb;
639  PFCB Fcb;
640  PCCB Ccb;
641 
642  BOOLEAN OplockPostIrp = FALSE;
643 
644  PAGED_CODE();
645 
646  //
647  // Get a pointer to the current Irp stack location
648  //
649 
651 
652  DebugTrace(+1, Dbg, "FatCommonLockControl\n", 0);
653  DebugTrace( 0, Dbg, "Irp = %p\n", Irp);
654  DebugTrace( 0, Dbg, "MinorFunction = %08lx\n", IrpSp->MinorFunction);
655 
656  //
657  // Decode the type of file object we're being asked to process
658  //
659 
661 
662  //
663  // If the file is not a user file open then we reject the request
664  // as an invalid parameter
665  //
666 
667  if (TypeOfOpen != UserFileOpen) {
668 
670 
671  DebugTrace(-1, Dbg, "FatCommonLockControl -> STATUS_INVALID_PARAMETER\n", 0);
673  }
674 
675  //
676  // Acquire exclusive access to the Fcb and enqueue the Irp if we didn't
677  // get access
678  //
679 
680  if (!FatAcquireSharedFcb( IrpContext, Fcb )) {
681 
682  Status = FatFsdPostRequest( IrpContext, Irp );
683 
684  DebugTrace(-1, Dbg, "FatCommonLockControl -> %08lx\n", Status);
685  return Status;
686  }
687 
688  _SEH2_TRY {
689 
690  //
691  // We check whether we can proceed
692  // based on the state of the file oplocks.
693  //
694 
695 #if (NTDDI_VERSION >= NTDDI_WIN8)
696 
697  if (((IRP_MN_LOCK == IrpSp->MinorFunction) &&
698  ((ULONGLONG)IrpSp->Parameters.LockControl.ByteOffset.QuadPart <
699  (ULONGLONG)Fcb->Header.AllocationSize.QuadPart)) ||
701  FsRtlAreThereWaitingFileLocks( &Fcb->Specific.Fcb.FileLock ))) {
702 
703  //
704  // Check whether we can proceed based on the state of file oplocks if doing
705  // an operation that interferes with oplocks. Those operations are:
706  //
707  // 1. Lock a range within the file's AllocationSize.
708  // 2. Unlock a range when there are waiting locks on the file. This one
709  // is not guaranteed to interfere with oplocks, but it could, as
710  // unlocking this range might cause a waiting lock to be granted
711  // within AllocationSize!
712  //
713 
714 #endif
716  Irp,
717  IrpContext,
719  NULL );
720 
721 #if (NTDDI_VERSION >= NTDDI_WIN8)
722  }
723 #endif
724 
725  if (Status != STATUS_SUCCESS) {
726 
727  OplockPostIrp = TRUE;
728  try_return( NOTHING );
729  }
730 
731  //
732  // Now call the FsRtl routine to do the actual processing of the
733  // Lock request
734  //
735 
736  Status = FsRtlProcessFileLock( &Fcb->Specific.Fcb.FileLock, Irp, NULL );
737 
738  //
739  // Set the flag indicating if Fast I/O is possible
740  //
741 
742  Fcb->Header.IsFastIoPossible = FatIsFastIoPossible( Fcb );
743 
744  try_exit: NOTHING;
745  } _SEH2_FINALLY {
746 
747  DebugUnwind( FatCommonLockControl );
748 
749  //
750  // Only if this is not an abnormal termination do we delete the
751  // irp context
752  //
753 
754  if (!_SEH2_AbnormalTermination() && !OplockPostIrp) {
755 
756  FatCompleteRequest( IrpContext, FatNull, 0 );
757  }
758 
759  //
760  // Release the Fcb, and return to our caller
761  //
762 
763  FatReleaseFcb( IrpContext, Fcb );
764 
765  DebugTrace(-1, Dbg, "FatCommonLockControl -> %08lx\n", Status);
766  } _SEH2_END;
767 
768  return Status;
769 }
770 
#define IN
Definition: typedefs.h:38
_Function_class_(IRP_MJ_LOCK_CONTROL)
Definition: lockctrl.c:35
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2697
#define TRUE
Definition: types.h:120
#define FsRtlEnterFileSystem
BOOLEAN FatIsIrpTopLevel(IN PIRP Irp)
Definition: fatdata.c:817
#define FsRtlExitFileSystem
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:931
#define FatCompleteRequest(IRPCONTEXT, IRP, STATUS)
Definition: fatprocs.h:2621
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN OUT PIO_STATUS_BLOCK IoStatus
Definition: fatprocs.h:2650
_In_ PIRP Irp
Definition: csq.h:116
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
Definition: cdstruc.h:908
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
Definition: cdstruc.h:1073
VOID NTAPI FatOplockComplete(IN PVOID Context, IN PIRP Irp)
Definition: workque.c:35
LONG NTSTATUS
Definition: precomp.h:26
#define DebugTrace(INDENT, LEVEL, X, Y)
Definition: fatdata.h:313
Definition: cdstruc.h:504
#define FatNull
Definition: fatdata.h:321
#define PAGED_CODE()
Definition: video.h:57
_SEH2_TRY
Definition: create.c:4250
IN PFCB IN PCCB IN TYPE_OF_OPEN IN BOOLEAN IN BOOLEAN TopLevel
Definition: fatprocs.h:2401
NTSTATUS NTAPI FsRtlFastUnlockAllByKey(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN ULONG Key, IN PVOID Context OPTIONAL)
Definition: filelock.c:1087
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN TypeOfOpen
Definition: cdprocs.h:593
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTSTATUS NTAPI FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN PEPROCESS Process, IN ULONG Key, IN PVOID Context OPTIONAL, IN BOOLEAN AlreadySynchronized)
Definition: filelock.c:829
Definition: Header.h:8
#define Dbg
Definition: lockctrl.c:23
#define FatGetFcbOplock(F)
Definition: fatprocs.h:1647
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN FailImmediately
Definition: fatprocs.h:2697
#define _SEH2_GetExceptionInformation()
Definition: pseh2_64.h:11
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define _SEH2_AbnormalTermination()
Definition: pseh2_64.h:13
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
PIRP_CONTEXT FatCreateIrpContext(IN PIRP Irp, IN BOOLEAN Wait)
Definition: strucsup.c:2300
#define DebugUnwind(X)
Definition: fatdata.h:315
#define FatReleaseFcb(IRPCONTEXT, Fcb)
Definition: fatprocs.h:1635
#define try_return(S)
Definition: cdprocs.h:2189
uint64_t ULONGLONG
Definition: typedefs.h:65
#define Vcb
Definition: cdprocs.h:1425
union _FCB::@708 Specific
#define _Inout_
Definition: no_sal2.h:244
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
* PFILE_OBJECT
Definition: iotypes.h:1955
#define CanFsdWait(I)
Definition: cdprocs.h:2011
_Requires_lock_held_(_Global_critical_region_)
Definition: lockctrl.c:608
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
Definition: irp.c:2000
struct _FCB::@708::@711 Fcb
#define VOID
Definition: acefi.h:82
enum _TYPE_OF_OPEN TYPE_OF_OPEN
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:593
#define NOTHING
Definition: env_spec_w32.h:461
NTSTATUS NTAPI FsRtlFastUnlockAll(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN PVOID Context OPTIONAL)
Definition: filelock.c:1026
DRIVER_DISPATCH(nfs41_FsdDispatch)
NTSTATUS NTAPI FsRtlProcessFileLock(IN PFILE_LOCK FileLock, IN PIRP Irp, IN PVOID Context OPTIONAL)
Definition: filelock.c:1153
Status
Definition: gdiplustypes.h:24
#define _In_
Definition: no_sal2.h:204
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
PFILE_OBJECT FileObject
Definition: iotypes.h:2813
_SEH2_END
Definition: create.c:4424
ULONG FatExceptionFilter(IN PIRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
Definition: fatdata.c:204
#define FatIsFastIoPossible(FCB)
Definition: fatprocs.h:2801
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4157
_SEH2_FINALLY
Definition: create.c:4395
#define IRP_MN_LOCK
Definition: iotypes.h:4054
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN BOOLEAN ExclusiveLock
Definition: fatprocs.h:2697
BOOLEAN NTAPI ExAcquireResourceSharedLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:885
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
NTSTATUS FatFsdPostRequest(IN PIRP_CONTEXT IrpContext, IN PIRP Irp)
Definition: workque.c:229
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
NTSTATUS NTAPI FsRtlCheckOplock(IN POPLOCK Oplock, IN PIRP Irp, IN PVOID Context, IN POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine OPTIONAL, IN POPLOCK_FS_PREPOST_IRP PostIrpRoutine OPTIONAL)
Definition: oplock.c:1172
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
_In_ PFCB Fcb
Definition: cdprocs.h:151
return STATUS_SUCCESS
Definition: btrfs.c:2938
#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)
Definition: fsrtlfuncs.h:1581
BOOLEAN NTAPI FsRtlOplockIsFastIoPossible(IN POPLOCK Oplock)
Definition: oplock.c:1566
TYPE_OF_OPEN FatDecodeFileObject(_In_ PFILE_OBJECT FileObject, _Outptr_ PVCB *Vcb, _Outptr_ PFCB *FcbOrDcb, _Outptr_ PCCB *Ccb)
Definition: filobsup.c:176