Author: pschweitzer
Date: Sun May 24 21:29:34 2015
New Revision: 67892
URL:
http://svn.reactos.org/svn/reactos?rev=67892&view=rev
Log:
[NTFS]
Handle IRP_MJ_CLOSE with the dispatch routine
Modified:
trunk/reactos/drivers/filesystems/ntfs/close.c
trunk/reactos/drivers/filesystems/ntfs/dispatch.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/close.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/close.c [iso-8859-1] Sun May 24 21:29:34 2015
@@ -79,35 +79,30 @@
}
-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;
}
Modified: trunk/reactos/drivers/filesystems/ntfs/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dispatch.c [iso-8859-1] Sun May 24 21:29:34
2015
@@ -96,6 +96,10 @@
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)) ||
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.c [iso-8859-1] Sun May 24 21:29:34 2015
@@ -124,7 +124,7 @@
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;
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun May 24 21:29:34 2015
@@ -521,10 +521,8 @@
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 */