-IoCancelIrp fixed/improved (Thanks to Gunnar Andr� Dalsnes).

svn path=/trunk/; revision=4067
This commit is contained in:
Hartmut Birr 2003-01-25 16:15:33 +00:00
parent 8b9d426c26
commit 5d6425550e

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: cancel.c,v 1.8 2002/09/08 10:23:24 chorns Exp $ /* $Id: cancel.c,v 1.9 2003/01/25 16:15:33 hbirr Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/cancel.c * FILE: ntoskrnl/io/cancel.c
@ -44,6 +44,7 @@ NtCancelIoFile (IN HANDLE FileHandle,
OUT PIO_STATUS_BLOCK IoStatusBlock) OUT PIO_STATUS_BLOCK IoStatusBlock)
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
return(STATUS_NOT_IMPLEMENTED);
} }
BOOLEAN STDCALL BOOLEAN STDCALL
@ -57,10 +58,11 @@ IoCancelIrp(PIRP Irp)
Irp->Cancel = TRUE; Irp->Cancel = TRUE;
if (Irp->CancelRoutine == NULL) if (Irp->CancelRoutine == NULL)
{ {
IoReleaseCancelSpinLock(oldlvl);
return(FALSE); return(FALSE);
} }
Irp->CancelRoutine(Irp->Stack[0].DeviceObject, Irp); Irp->CancelIrql = oldlvl;
IoReleaseCancelSpinLock(oldlvl); Irp->CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
return(TRUE); return(TRUE);
} }