mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
[NPFS]
- Use NpAcquire*Vcb/NpReleaseVcb instead of using NpVcb directly - CaseInsensitiveIndex is integer, not boolean - Minor fixes involving unnecessary casts and magic numbers svn path=/trunk/; revision=64761
This commit is contained in:
parent
a28fa3fdf0
commit
c38e07c128
7 changed files with 18 additions and 19 deletions
|
@ -384,7 +384,7 @@ NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IoStatus.Information = 0;
|
IoStatus.Information = 0;
|
||||||
|
|
||||||
FsRtlEnterFileSystem();
|
FsRtlEnterFileSystem();
|
||||||
ExAcquireResourceExclusiveLite(&NpVcb->Lock, TRUE);
|
NpAcquireExclusiveVcb();
|
||||||
|
|
||||||
if (RelatedFileObject)
|
if (RelatedFileObject)
|
||||||
{
|
{
|
||||||
|
@ -462,7 +462,7 @@ NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
|
||||||
goto Quickie;
|
goto Quickie;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fcb = NpFindPrefix(&FileName, TRUE, &Prefix);
|
Fcb = NpFindPrefix(&FileName, 1, &Prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Prefix.Length)
|
if (Prefix.Length)
|
||||||
|
@ -499,7 +499,7 @@ NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
|
||||||
&DeferredList);
|
&DeferredList);
|
||||||
|
|
||||||
Quickie:
|
Quickie:
|
||||||
ExReleaseResourceLite(&NpVcb->Lock);
|
NpReleaseVcb();
|
||||||
NpCompleteDeferredIrps(&DeferredList);
|
NpCompleteDeferredIrps(&DeferredList);
|
||||||
FsRtlExitFileSystem();
|
FsRtlExitFileSystem();
|
||||||
|
|
||||||
|
@ -852,7 +852,7 @@ NpFsdCreateNamedPipe(IN PDEVICE_OBJECT DeviceObject,
|
||||||
goto Quickie;
|
goto Quickie;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fcb = NpFindPrefix(&FileName, TRUE, &Prefix);
|
Fcb = NpFindPrefix(&FileName, 1, &Prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Prefix.Length)
|
if (Prefix.Length)
|
||||||
|
|
|
@ -85,7 +85,7 @@ NpCompleteStalledWrites(IN PNP_DATA_QUEUE DataQueue,
|
||||||
{
|
{
|
||||||
DataQueueEntry->Irp = NULL;
|
DataQueueEntry->Irp = NULL;
|
||||||
|
|
||||||
Irp->IoStatus.Status = 0;
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
Irp->IoStatus.Information = DataQueueEntry->DataSize;
|
Irp->IoStatus.Information = DataQueueEntry->DataSize;
|
||||||
|
|
||||||
InsertTailList(List, &Irp->Tail.Overlay.ListEntry);
|
InsertTailList(List, &Irp->Tail.Overlay.ListEntry);
|
||||||
|
@ -216,7 +216,7 @@ NpCancelDataQueueIrp(IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
InitializeListHead(&DeferredList);
|
InitializeListHead(&DeferredList);
|
||||||
|
|
||||||
DataQueue = (PNP_DATA_QUEUE)Irp->Tail.Overlay.DriverContext[2];
|
DataQueue = Irp->Tail.Overlay.DriverContext[2];
|
||||||
ClientSecurityContext = NULL;
|
ClientSecurityContext = NULL;
|
||||||
|
|
||||||
if (DeviceObject)
|
if (DeviceObject)
|
||||||
|
|
|
@ -369,7 +369,7 @@ NpPeek(IN PDEVICE_OBJECT DeviceObject,
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
PeekBuffer = (PFILE_PIPE_PEEK_BUFFER)Irp->AssociatedIrp.SystemBuffer;
|
PeekBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||||
if (NamedPipeEnd != FILE_PIPE_CLIENT_END)
|
if (NamedPipeEnd != FILE_PIPE_CLIENT_END)
|
||||||
{
|
{
|
||||||
if (NamedPipeEnd != FILE_PIPE_SERVER_END)
|
if (NamedPipeEnd != FILE_PIPE_SERVER_END)
|
||||||
|
@ -714,7 +714,7 @@ NpWaitForNamedPipe(IN PDEVICE_OBJECT DeviceObject,
|
||||||
//Status = NpTranslateAlias(&SourceString);
|
//Status = NpTranslateAlias(&SourceString);
|
||||||
if (!NT_SUCCESS(Status)) goto Quickie;
|
if (!NT_SUCCESS(Status)) goto Quickie;
|
||||||
|
|
||||||
Fcb = NpFindPrefix(&SourceString, TRUE, &Prefix);
|
Fcb = NpFindPrefix(&SourceString, 1, &Prefix);
|
||||||
Fcb = (PNP_FCB)((ULONG_PTR)Fcb & ~1);
|
Fcb = (PNP_FCB)((ULONG_PTR)Fcb & ~1);
|
||||||
|
|
||||||
NodeTypeCode = Fcb ? Fcb->NodeType : 0;
|
NodeTypeCode = Fcb ? Fcb->NodeType : 0;
|
||||||
|
|
|
@ -127,7 +127,6 @@ NpGetClientSecurityContext(IN ULONG NamedPipeEnd,
|
||||||
IN PETHREAD Thread,
|
IN PETHREAD Thread,
|
||||||
IN PSECURITY_CLIENT_CONTEXT *Context)
|
IN PSECURITY_CLIENT_CONTEXT *Context)
|
||||||
{
|
{
|
||||||
|
|
||||||
PSECURITY_CLIENT_CONTEXT NewContext;
|
PSECURITY_CLIENT_CONTEXT NewContext;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
|
@ -191,11 +191,11 @@ NpFsdQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject,
|
||||||
TRACE("Entered\n");
|
TRACE("Entered\n");
|
||||||
|
|
||||||
FsRtlEnterFileSystem();
|
FsRtlEnterFileSystem();
|
||||||
ExAcquireResourceSharedLite(&NpVcb->Lock, TRUE);
|
NpAcquireSharedVcb();
|
||||||
|
|
||||||
Status = NpCommonQueryVolumeInformation(DeviceObject, Irp);
|
Status = NpCommonQueryVolumeInformation(DeviceObject, Irp);
|
||||||
|
|
||||||
ExReleaseResourceLite(&NpVcb->Lock);
|
NpReleaseVcb();
|
||||||
FsRtlExitFileSystem();
|
FsRtlExitFileSystem();
|
||||||
|
|
||||||
if (Status != STATUS_PENDING)
|
if (Status != STATUS_PENDING)
|
||||||
|
|
|
@ -57,7 +57,7 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
|
||||||
{
|
{
|
||||||
DataSize = DataEntry->DataSize;
|
DataSize = DataEntry->DataSize;
|
||||||
|
|
||||||
IoStack = IoGetCurrentIrpStackLocation( DataEntry->Irp);
|
IoStack = IoGetCurrentIrpStackLocation(DataEntry->Irp);
|
||||||
|
|
||||||
if (IoStack->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL &&
|
if (IoStack->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL &&
|
||||||
IoStack->Parameters.FileSystemControl.FsControlCode == FSCTL_PIPE_INTERNAL_READ_OVFLOW &&
|
IoStack->Parameters.FileSystemControl.FsControlCode == FSCTL_PIPE_INTERNAL_READ_OVFLOW &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue