mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NTFS]
Handle IRP_MJ_CLOSE with the dispatch routine svn path=/trunk/; revision=67892
This commit is contained in:
parent
f73342d9da
commit
1dd645fcbd
4 changed files with 16 additions and 19 deletions
|
@ -79,35 +79,30 @@ NtfsCloseFile(PDEVICE_EXTENSION DeviceExt,
|
|||
}
|
||||
|
||||
|
||||
NTSTATUS NTAPI
|
||||
NtfsFsdClose(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
NTSTATUS
|
||||
NtfsClose(PNTFS_IRP_CONTEXT IrpContext)
|
||||
{
|
||||
PDEVICE_EXTENSION DeviceExtension;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
|
||||
DPRINT("NtfsClose() called\n");
|
||||
|
||||
DeviceObject = IrpContext->DeviceObject;
|
||||
if (DeviceObject == NtfsGlobalData->DeviceObject)
|
||||
{
|
||||
DPRINT("Closing file system\n");
|
||||
Status = STATUS_SUCCESS;
|
||||
goto ByeBye;
|
||||
IrpContext->Irp->IoStatus.Information = 0;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
FileObject = Stack->FileObject;
|
||||
FileObject = IrpContext->FileObject;
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
|
||||
Status = NtfsCloseFile(DeviceExtension,FileObject);
|
||||
Status = NtfsCloseFile(DeviceExtension, FileObject);
|
||||
|
||||
ByeBye:
|
||||
Irp->IoStatus.Status = Status;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
IrpContext->Irp->IoStatus.Information = 0;
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,10 @@ NtfsDispatch(PNTFS_IRP_CONTEXT IrpContext)
|
|||
case IRP_MJ_WRITE:
|
||||
Status = NtfsWrite(IrpContext);
|
||||
break;
|
||||
|
||||
case IRP_MJ_CLOSE:
|
||||
Status = NtfsClose(IrpContext);
|
||||
break;
|
||||
}
|
||||
|
||||
ASSERT((!(IrpContext->Flags & IRPCONTEXT_COMPLETE) && !(IrpContext->Flags & IRPCONTEXT_QUEUE)) ||
|
||||
|
|
|
@ -124,7 +124,7 @@ NTAPI
|
|||
NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
|
||||
{
|
||||
DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsFsdCreate;
|
||||
DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsFsdClose;
|
||||
DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsFsdDispatch;
|
||||
DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdDispatch;
|
||||
DriverObject->MajorFunction[IRP_MJ_WRITE] = NtfsFsdDispatch;
|
||||
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NtfsFsdDispatch;
|
||||
|
|
|
@ -521,10 +521,8 @@ NTSTATUS
|
|||
NtfsCloseFile(PDEVICE_EXTENSION DeviceExt,
|
||||
PFILE_OBJECT FileObject);
|
||||
|
||||
DRIVER_DISPATCH NtfsFsdClose;
|
||||
NTSTATUS NTAPI
|
||||
NtfsFsdClose(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp);
|
||||
NTSTATUS
|
||||
NtfsClose(PNTFS_IRP_CONTEXT IrpContext);
|
||||
|
||||
|
||||
/* create.c */
|
||||
|
|
Loading…
Reference in a new issue