Fixed backwards access check that was causing NtWriteFile to fail when given a read only buffer

svn path=/trunk/; revision=15194
This commit is contained in:
Phillip Susi 2005-05-09 22:12:43 +00:00
parent 6ed3a8cd3f
commit dfcf0aade2

View file

@ -472,14 +472,14 @@ IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
/* Use an MDL for Direct I/O */
Irp->MdlAddress = MmCreateMdl(NULL, Buffer, Length);
/* Use the right Access Type */
if (MajorFunction == IRP_MJ_READ)
{
AccessType = IoReadAccess;
AccessType = IoWriteAccess;
}
else
{
AccessType = IoWriteAccess;
AccessType = IoReadAccess;
}
/* Probe and Lock */