mirror of
https://github.com/reactos/reactos.git
synced 2025-07-26 23:14:17 +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;
|
||||
|
||||
FsRtlEnterFileSystem();
|
||||
ExAcquireResourceExclusiveLite(&NpVcb->Lock, TRUE);
|
||||
NpAcquireExclusiveVcb();
|
||||
|
||||
if (RelatedFileObject)
|
||||
{
|
||||
|
@ -462,7 +462,7 @@ NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
|
|||
goto Quickie;
|
||||
}
|
||||
|
||||
Fcb = NpFindPrefix(&FileName, TRUE, &Prefix);
|
||||
Fcb = NpFindPrefix(&FileName, 1, &Prefix);
|
||||
}
|
||||
|
||||
if (Prefix.Length)
|
||||
|
@ -499,7 +499,7 @@ NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
|
|||
&DeferredList);
|
||||
|
||||
Quickie:
|
||||
ExReleaseResourceLite(&NpVcb->Lock);
|
||||
NpReleaseVcb();
|
||||
NpCompleteDeferredIrps(&DeferredList);
|
||||
FsRtlExitFileSystem();
|
||||
|
||||
|
@ -852,7 +852,7 @@ NpFsdCreateNamedPipe(IN PDEVICE_OBJECT DeviceObject,
|
|||
goto Quickie;
|
||||
}
|
||||
|
||||
Fcb = NpFindPrefix(&FileName, TRUE, &Prefix);
|
||||
Fcb = NpFindPrefix(&FileName, 1, &Prefix);
|
||||
}
|
||||
|
||||
if (Prefix.Length)
|
||||
|
|
|
@ -85,7 +85,7 @@ NpCompleteStalledWrites(IN PNP_DATA_QUEUE DataQueue,
|
|||
{
|
||||
DataQueueEntry->Irp = NULL;
|
||||
|
||||
Irp->IoStatus.Status = 0;
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = DataQueueEntry->DataSize;
|
||||
|
||||
InsertTailList(List, &Irp->Tail.Overlay.ListEntry);
|
||||
|
@ -216,7 +216,7 @@ NpCancelDataQueueIrp(IN PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
InitializeListHead(&DeferredList);
|
||||
|
||||
DataQueue = (PNP_DATA_QUEUE)Irp->Tail.Overlay.DriverContext[2];
|
||||
DataQueue = Irp->Tail.Overlay.DriverContext[2];
|
||||
ClientSecurityContext = NULL;
|
||||
|
||||
if (DeviceObject)
|
||||
|
|
|
@ -369,7 +369,7 @@ NpPeek(IN PDEVICE_OBJECT DeviceObject,
|
|||
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_SERVER_END)
|
||||
|
@ -714,7 +714,7 @@ NpWaitForNamedPipe(IN PDEVICE_OBJECT DeviceObject,
|
|||
//Status = NpTranslateAlias(&SourceString);
|
||||
if (!NT_SUCCESS(Status)) goto Quickie;
|
||||
|
||||
Fcb = NpFindPrefix(&SourceString, TRUE, &Prefix);
|
||||
Fcb = NpFindPrefix(&SourceString, 1, &Prefix);
|
||||
Fcb = (PNP_FCB)((ULONG_PTR)Fcb & ~1);
|
||||
|
||||
NodeTypeCode = Fcb ? Fcb->NodeType : 0;
|
||||
|
|
|
@ -127,7 +127,6 @@ NpGetClientSecurityContext(IN ULONG NamedPipeEnd,
|
|||
IN PETHREAD Thread,
|
||||
IN PSECURITY_CLIENT_CONTEXT *Context)
|
||||
{
|
||||
|
||||
PSECURITY_CLIENT_CONTEXT NewContext;
|
||||
NTSTATUS Status;
|
||||
PAGED_CODE();
|
||||
|
|
|
@ -191,11 +191,11 @@ NpFsdQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject,
|
|||
TRACE("Entered\n");
|
||||
|
||||
FsRtlEnterFileSystem();
|
||||
ExAcquireResourceSharedLite(&NpVcb->Lock, TRUE);
|
||||
NpAcquireSharedVcb();
|
||||
|
||||
Status = NpCommonQueryVolumeInformation(DeviceObject, Irp);
|
||||
|
||||
ExReleaseResourceLite(&NpVcb->Lock);
|
||||
NpReleaseVcb();
|
||||
FsRtlExitFileSystem();
|
||||
|
||||
if (Status != STATUS_PENDING)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue