MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2QueryFileInformation

Function Ext2QueryFileInformation

Ext4Fsd/fileinfo.c:42–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42NTSTATUS
43Ext2QueryFileInformation (IN PEXT2_IRP_CONTEXT IrpContext)
44{
45 PDEVICE_OBJECT DeviceObject;
46 NTSTATUS Status = STATUS_UNSUCCESSFUL;
47 PFILE_OBJECT FileObject;
48 PEXT2_VCB Vcb = NULL;
49 PEXT2_FCB Fcb = NULL;
50 PEXT2_MCB Mcb = NULL;
51 PEXT2_CCB Ccb = NULL;
52 PIRP Irp = NULL;
53 PIO_STACK_LOCATION IoStackLocation;
54 FILE_INFORMATION_CLASS FileInformationClass;
55 ULONG Length;
56 PVOID Buffer;
57 BOOLEAN FcbResourceAcquired = FALSE;
58
59 __try {
60
61 ASSERT(IrpContext != NULL);
62 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
63 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
64
65 DeviceObject = IrpContext->DeviceObject;
66
67 //
68 // This request is not allowed on the main device object
69 //
70 if (IsExt2FsDevice(DeviceObject)) {
71 Status = STATUS_INVALID_DEVICE_REQUEST;
72 __leave;
73 }
74
75 FileObject = IrpContext->FileObject;
76 Fcb = (PEXT2_FCB) FileObject->FsContext;
77 if (Fcb == NULL) {
78 Status = STATUS_INVALID_PARAMETER;
79 __leave;
80 }
81
82 //
83 // This request is not allowed on volumes
84 //
85 if (Fcb->Identifier.Type == EXT2VCB) {
86 Status = STATUS_INVALID_PARAMETER;
87 __leave;
88 }
89
90 if (!((Fcb->Identifier.Type == EXT2FCB) &&
91 (Fcb->Identifier.Size == sizeof(EXT2_FCB)))) {
92 Status = STATUS_INVALID_PARAMETER;
93 __leave;
94 }
95
96 Vcb = Fcb->Vcb;
97
98 {
99 if (!ExAcquireResourceSharedLite(

Callers 1

Ext2DispatchRequestFunction · 0.85

Calls 6

Ext2WinntErrorFunction · 0.85
ext4_fs_get_xattr_refFunction · 0.85
ext4_fs_xattr_iterateFunction · 0.85
ext4_fs_put_xattr_refFunction · 0.85
Ext2QueueRequestFunction · 0.85
Ext2CompleteIrpContextFunction · 0.85

Tested by

no test coverage detected