mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[NTFS]
Even more locking svn path=/trunk/; revision=70779
This commit is contained in:
parent
3d8efb5447
commit
5876421913
2 changed files with 21 additions and 0 deletions
|
@ -305,6 +305,12 @@ NtfsQueryDirectory(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ExAcquireResourceSharedLite(&Fcb->MainResource,
|
||||||
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
|
{
|
||||||
|
return STATUS_PENDING;
|
||||||
|
}
|
||||||
|
|
||||||
if (SearchPattern != NULL)
|
if (SearchPattern != NULL)
|
||||||
{
|
{
|
||||||
if (!Ccb->DirectorySearchPattern)
|
if (!Ccb->DirectorySearchPattern)
|
||||||
|
@ -316,6 +322,7 @@ NtfsQueryDirectory(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
ExAllocatePoolWithTag(NonPagedPool, Pattern.MaximumLength, TAG_NTFS);
|
ExAllocatePoolWithTag(NonPagedPool, Pattern.MaximumLength, TAG_NTFS);
|
||||||
if (!Ccb->DirectorySearchPattern)
|
if (!Ccb->DirectorySearchPattern)
|
||||||
{
|
{
|
||||||
|
ExReleaseResourceLite(&Fcb->MainResource);
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,6 +336,7 @@ NtfsQueryDirectory(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
Ccb->DirectorySearchPattern = ExAllocatePoolWithTag(NonPagedPool, 2 * sizeof(WCHAR), TAG_NTFS);
|
Ccb->DirectorySearchPattern = ExAllocatePoolWithTag(NonPagedPool, 2 * sizeof(WCHAR), TAG_NTFS);
|
||||||
if (!Ccb->DirectorySearchPattern)
|
if (!Ccb->DirectorySearchPattern)
|
||||||
{
|
{
|
||||||
|
ExReleaseResourceLite(&Fcb->MainResource);
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,6 +469,8 @@ NtfsQueryDirectory(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
Buffer0->NextEntryOffset = 0;
|
Buffer0->NextEntryOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExReleaseResourceLite(&Fcb->MainResource);
|
||||||
|
|
||||||
if (FileIndex > 0)
|
if (FileIndex > 0)
|
||||||
{
|
{
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
|
|
|
@ -246,6 +246,7 @@ NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
PVOID SystemBuffer;
|
PVOID SystemBuffer;
|
||||||
ULONG BufferLength;
|
ULONG BufferLength;
|
||||||
|
PDEVICE_EXTENSION DeviceExt;
|
||||||
|
|
||||||
DPRINT("NtfsQueryVolumeInformation() called\n");
|
DPRINT("NtfsQueryVolumeInformation() called\n");
|
||||||
|
|
||||||
|
@ -253,7 +254,15 @@ NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
|
|
||||||
Irp = IrpContext->Irp;
|
Irp = IrpContext->Irp;
|
||||||
DeviceObject = IrpContext->DeviceObject;
|
DeviceObject = IrpContext->DeviceObject;
|
||||||
|
DeviceExt = DeviceObject->DeviceExtension;
|
||||||
Stack = IrpContext->Stack;
|
Stack = IrpContext->Stack;
|
||||||
|
|
||||||
|
if (!ExAcquireResourceSharedLite(&DeviceExt->DirResource,
|
||||||
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
|
{
|
||||||
|
return NtfsMarkIrpContextForQueue(IrpContext);
|
||||||
|
}
|
||||||
|
|
||||||
FsInformationClass = Stack->Parameters.QueryVolume.FsInformationClass;
|
FsInformationClass = Stack->Parameters.QueryVolume.FsInformationClass;
|
||||||
BufferLength = Stack->Parameters.QueryVolume.Length;
|
BufferLength = Stack->Parameters.QueryVolume.Length;
|
||||||
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
|
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
@ -292,6 +301,8 @@ NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
Status = STATUS_NOT_SUPPORTED;
|
Status = STATUS_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExReleaseResourceLite(&DeviceExt->DirResource);
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
Irp->IoStatus.Information =
|
Irp->IoStatus.Information =
|
||||||
Stack->Parameters.QueryVolume.Length - BufferLength;
|
Stack->Parameters.QueryVolume.Length - BufferLength;
|
||||||
|
|
Loading…
Reference in a new issue