mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:33:16 +00:00
[FASTFAT]
[NTFS] Remove useless cast and use appropriate macro. Spotted by Thomas svn path=/trunk/; revision=67911
This commit is contained in:
parent
94d99f3fe3
commit
37a429b0be
6 changed files with 13 additions and 13 deletions
|
@ -47,12 +47,12 @@ VfatCleanupFile(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!ExAcquireResourceExclusiveLite(&pFcb->MainResource,
|
if(!ExAcquireResourceExclusiveLite(&pFcb->MainResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
return STATUS_PENDING;
|
return STATUS_PENDING;
|
||||||
}
|
}
|
||||||
if(!ExAcquireResourceExclusiveLite(&pFcb->PagingIoResource,
|
if(!ExAcquireResourceExclusiveLite(&pFcb->PagingIoResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
ExReleaseResourceLite(&pFcb->MainResource);
|
ExReleaseResourceLite(&pFcb->MainResource);
|
||||||
return STATUS_PENDING;
|
return STATUS_PENDING;
|
||||||
|
@ -157,7 +157,7 @@ VfatCleanup(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource,
|
if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
return VfatMarkIrpContextForQueue(IrpContext);
|
return VfatMarkIrpContextForQueue(IrpContext);
|
||||||
}
|
}
|
||||||
|
|
|
@ -422,7 +422,7 @@ DoQuery(
|
||||||
Buffer = VfatGetUserBuffer(IrpContext->Irp, FALSE);
|
Buffer = VfatGetUserBuffer(IrpContext->Irp, FALSE);
|
||||||
|
|
||||||
if (!ExAcquireResourceSharedLite(&pFcb->MainResource,
|
if (!ExAcquireResourceSharedLite(&pFcb->MainResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
Status = VfatLockUserBuffer(IrpContext->Irp, BufferLength, IoWriteAccess);
|
Status = VfatLockUserBuffer(IrpContext->Irp, BufferLength, IoWriteAccess);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
@ -505,7 +505,7 @@ DoQuery(
|
||||||
DirContext.ShortNameU.MaximumLength = sizeof(ShortNameBuffer);
|
DirContext.ShortNameU.MaximumLength = sizeof(ShortNameBuffer);
|
||||||
|
|
||||||
if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource,
|
if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
ExReleaseResourceLite(&pFcb->MainResource);
|
ExReleaseResourceLite(&pFcb->MainResource);
|
||||||
return VfatMarkIrpContextForQueue(IrpContext);
|
return VfatMarkIrpContextForQueue(IrpContext);
|
||||||
|
|
|
@ -1377,7 +1377,7 @@ VfatQueryInformation(
|
||||||
if (!(FCB->Flags & FCB_IS_PAGE_FILE))
|
if (!(FCB->Flags & FCB_IS_PAGE_FILE))
|
||||||
{
|
{
|
||||||
if (!ExAcquireResourceSharedLite(&FCB->MainResource,
|
if (!ExAcquireResourceSharedLite(&FCB->MainResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
return VfatMarkIrpContextForQueue(IrpContext);
|
return VfatMarkIrpContextForQueue(IrpContext);
|
||||||
}
|
}
|
||||||
|
@ -1514,7 +1514,7 @@ VfatSetInformation(
|
||||||
if (FileInformationClass == FileRenameInformation)
|
if (FileInformationClass == FileRenameInformation)
|
||||||
{
|
{
|
||||||
if (!ExAcquireResourceExclusiveLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
|
if (!ExAcquireResourceExclusiveLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
return VfatMarkIrpContextForQueue(IrpContext);
|
return VfatMarkIrpContextForQueue(IrpContext);
|
||||||
}
|
}
|
||||||
|
@ -1523,7 +1523,7 @@ VfatSetInformation(
|
||||||
if (!(FCB->Flags & FCB_IS_PAGE_FILE))
|
if (!(FCB->Flags & FCB_IS_PAGE_FILE))
|
||||||
{
|
{
|
||||||
if (!ExAcquireResourceExclusiveLite(&FCB->MainResource,
|
if (!ExAcquireResourceExclusiveLite(&FCB->MainResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
if (FileInformationClass == FileRenameInformation)
|
if (FileInformationClass == FileRenameInformation)
|
||||||
{
|
{
|
||||||
|
|
|
@ -887,7 +887,7 @@ VfatWrite(
|
||||||
if (Fcb->Flags & FCB_IS_PAGE_FILE)
|
if (Fcb->Flags & FCB_IS_PAGE_FILE)
|
||||||
{
|
{
|
||||||
if (!ExAcquireResourceSharedLite(Resource,
|
if (!ExAcquireResourceSharedLite(Resource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
Resource = NULL;
|
Resource = NULL;
|
||||||
Status = STATUS_PENDING;
|
Status = STATUS_PENDING;
|
||||||
|
@ -897,7 +897,7 @@ VfatWrite(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!ExAcquireResourceExclusiveLite(Resource,
|
if (!ExAcquireResourceExclusiveLite(Resource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
Resource = NULL;
|
Resource = NULL;
|
||||||
Status = STATUS_PENDING;
|
Status = STATUS_PENDING;
|
||||||
|
|
|
@ -361,7 +361,7 @@ VfatQueryVolumeInformation(
|
||||||
DPRINT("VfatQueryVolumeInformation(IrpContext %p)\n", IrpContext);
|
DPRINT("VfatQueryVolumeInformation(IrpContext %p)\n", IrpContext);
|
||||||
|
|
||||||
if (!ExAcquireResourceSharedLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
|
if (!ExAcquireResourceSharedLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
DPRINT1("DirResource failed!\n");
|
DPRINT1("DirResource failed!\n");
|
||||||
return VfatMarkIrpContextForQueue(IrpContext);
|
return VfatMarkIrpContextForQueue(IrpContext);
|
||||||
|
@ -436,7 +436,7 @@ VfatSetVolumeInformation(
|
||||||
DPRINT("VfatSetVolumeInformation(IrpContext %p)\n", IrpContext);
|
DPRINT("VfatSetVolumeInformation(IrpContext %p)\n", IrpContext);
|
||||||
|
|
||||||
if (!ExAcquireResourceExclusiveLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
|
if (!ExAcquireResourceExclusiveLite(&((PDEVICE_EXTENSION)IrpContext->DeviceObject->DeviceExtension)->DirResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
return VfatMarkIrpContextForQueue(IrpContext);
|
return VfatMarkIrpContextForQueue(IrpContext);
|
||||||
}
|
}
|
||||||
|
|
|
@ -247,7 +247,7 @@ NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext)
|
||||||
BufferLength = Stack->Parameters.QueryFile.Length;
|
BufferLength = Stack->Parameters.QueryFile.Length;
|
||||||
|
|
||||||
if (!ExAcquireResourceSharedLite(&Fcb->MainResource,
|
if (!ExAcquireResourceSharedLite(&Fcb->MainResource,
|
||||||
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT)))
|
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
|
||||||
{
|
{
|
||||||
return NtfsMarkIrpContextForQueue(IrpContext);
|
return NtfsMarkIrpContextForQueue(IrpContext);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue