Author: pschweitzer
Date: Mon May 25 11:58:23 2015
New Revision: 67903
URL:
http://svn.reactos.org/svn/reactos?rev=67903&view=rev
Log:
[NTFS]
Handle IRP_MJ_CREATTE with the dispatch routine
Modified:
trunk/reactos/drivers/filesystems/ntfs/create.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/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/create.c [iso-8859-1] Mon May 25 11:58:23 2015
@@ -405,43 +405,34 @@
* fail immediately
*/
Irp->IoStatus.Information = (NT_SUCCESS(Status)) ? FILE_OPENED : 0;
- Irp->IoStatus.Status = Status;
return Status;
}
NTSTATUS
-NTAPI
-NtfsFsdCreate(PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
+NtfsCreate(PNTFS_IRP_CONTEXT IrpContext)
{
PDEVICE_EXTENSION DeviceExt;
NTSTATUS Status;
-
+ PDEVICE_OBJECT DeviceObject;
+
+ DeviceObject = IrpContext->DeviceObject;
if (DeviceObject == NtfsGlobalData->DeviceObject)
{
/* DeviceObject represents FileSystem instead of logical volume */
DPRINT("Opening file system\n");
- Irp->IoStatus.Information = FILE_OPENED;
- Status = STATUS_SUCCESS;
- goto ByeBye;
+ IrpContext->Irp->IoStatus.Information = FILE_OPENED;
+ return STATUS_SUCCESS;
}
DeviceExt = DeviceObject->DeviceExtension;
- FsRtlEnterFileSystem();
ExAcquireResourceExclusiveLite(&DeviceExt->DirResource,
TRUE);
Status = NtfsCreateFile(DeviceObject,
- Irp);
+ IrpContext->Irp);
ExReleaseResourceLite(&DeviceExt->DirResource);
- FsRtlExitFileSystem();
-
-ByeBye:
- Irp->IoStatus.Status = Status;
- IoCompleteRequest(Irp,
- NT_SUCCESS(Status) ? IO_DISK_INCREMENT : IO_NO_INCREMENT);
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] Mon May 25 11:58:23
2015
@@ -100,6 +100,10 @@
case IRP_MJ_CLOSE:
Status = NtfsClose(IrpContext);
break;
+
+ case IRP_MJ_CREATE:
+ Status = NtfsCreate(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] Mon May 25 11:58:23 2015
@@ -123,7 +123,7 @@
NTAPI
NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
{
- DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsFsdCreate;
+ DriverObject->MajorFunction[IRP_MJ_CREATE] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_READ] = NtfsFsdDispatch;
DriverObject->MajorFunction[IRP_MJ_WRITE] = 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] Mon May 25 11:58:23 2015
@@ -527,10 +527,8 @@
/* create.c */
-DRIVER_DISPATCH NtfsFsdCreate;
-NTSTATUS NTAPI
-NtfsFsdCreate(PDEVICE_OBJECT DeviceObject,
- PIRP Irp);
+NTSTATUS
+NtfsCreate(PNTFS_IRP_CONTEXT IrpContext);
/* devctl.c */