ReactOS  0.4.14-dev-815-ge410a12
close.c File Reference
#include "npfs.h"
Include dependency graph for close.c:

Go to the source code of this file.

Macros

#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_CLOSE)
 

Functions

NTSTATUS NTAPI NpCommonClose (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI NpFsdClose (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 

Macro Definition Documentation

◆ NPFS_BUGCHECK_FILE_ID

#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_CLOSE)

Definition at line 14 of file close.c.

Function Documentation

◆ NpCommonClose()

NTSTATUS NTAPI NpCommonClose ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 20 of file close.c.

22 {
23  PIO_STACK_LOCATION IoStack;
24  NODE_TYPE_CODE NodeTypeCode;
25  LIST_ENTRY DeferredList;
26  PNP_FCB Fcb;
27  PNP_CCB Ccb;
28  ULONG NamedPipeEnd;
29  PAGED_CODE();
30 
32  InitializeListHead(&DeferredList);
33 
35  NodeTypeCode = NpDecodeFileObject(IoStack->FileObject,
36  (PVOID*)&Fcb,
37  &Ccb,
38  &NamedPipeEnd);
39  if (NodeTypeCode == NPFS_NTC_ROOT_DCB)
40  {
41  --Fcb->CurrentInstances;
42  NpDeleteCcb(Ccb, &DeferredList);
43  }
44  else if (NodeTypeCode == NPFS_NTC_VCB)
45  {
47  }
48 
49  NpReleaseVcb();
50  NpCompleteDeferredIrps(&DeferredList);
51 
52  Irp->IoStatus.Status = STATUS_SUCCESS;
54  return STATUS_SUCCESS;
55 }
_In_ PIRP Irp
Definition: csq.h:116
#define PAGED_CODE()
Definition: video.h:57
Definition: npfs.h:228
Definition: npfs.h:258
ULONG ReferenceCount
Definition: npfs.h:280
#define IoCompleteRequest
Definition: irp.c:1240
PNP_VCB NpVcb
Definition: strucsup.c:19
#define IO_NAMED_PIPE_INCREMENT
Definition: iotypes.h:572
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:593
Definition: typedefs.h:117
#define NPFS_NTC_ROOT_DCB
Definition: npfs.h:113
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
PFILE_OBJECT FileObject
Definition: iotypes.h:2813
VOID NTAPI NpDeleteCcb(IN PNP_CCB Ccb, IN PLIST_ENTRY ListEntry)
Definition: strucsup.c:92
FORCEINLINE VOID NpReleaseVcb(VOID)
Definition: npfs.h:344
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
unsigned int ULONG
Definition: retypes.h:1
NODE_TYPE_CODE NTAPI NpDecodeFileObject(IN PFILE_OBJECT FileObject, OUT PVOID *PrimaryContext OPTIONAL, OUT PNP_CCB *Ccb, OUT PULONG NamedPipeEnd OPTIONAL)
Definition: fileobsup.c:20
FORCEINLINE VOID NpAcquireExclusiveVcb(VOID)
Definition: npfs.h:336
USHORT NODE_TYPE_CODE
Definition: nodetype.h:22
_In_ PFCB Fcb
Definition: cdprocs.h:151
return STATUS_SUCCESS
Definition: btrfs.c:2938
FORCEINLINE VOID NpCompleteDeferredIrps(IN PLIST_ENTRY DeferredList)
Definition: npfs.h:356
#define NPFS_NTC_VCB
Definition: npfs.h:112

Referenced by NpFsdClose().

◆ NpFsdClose()

NTSTATUS NTAPI NpFsdClose ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 59 of file close.c.

61 {
63  PAGED_CODE();
64 
66 
68 
70 
71  return Status;
72 }
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
_In_ PIRP Irp
Definition: csq.h:116
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI NpCommonClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: close.c:20
#define PAGED_CODE()
Definition: video.h:57
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560

Referenced by DriverEntry().