[SCSIPORT] Addendum to 58ad5d9e02

This commit is contained in:
Jérôme Gardou 2020-12-09 12:40:51 +01:00
parent 58ad5d9e02
commit b089903520

View file

@ -400,6 +400,9 @@ SpiGetNextRequestFromLun(
else else
{ {
/* Release the spinlock, without clearing any flags and exit */ /* Release the spinlock, without clearing any flags and exit */
if (OldIrql != NULL)
KeReleaseSpinLock(&DeviceExtension->SpinLock, *OldIrql);
else
KeReleaseSpinLockFromDpcLevel(&DeviceExtension->SpinLock); KeReleaseSpinLockFromDpcLevel(&DeviceExtension->SpinLock);
return; return;
@ -429,6 +432,9 @@ SpiGetNextRequestFromLun(
LunExtension->SortKey++; LunExtension->SortKey++;
/* Release the spinlock */ /* Release the spinlock */
if (OldIrql != NULL)
KeReleaseSpinLock(&DeviceExtension->SpinLock, *OldIrql);
else
KeReleaseSpinLockFromDpcLevel(&DeviceExtension->SpinLock); KeReleaseSpinLockFromDpcLevel(&DeviceExtension->SpinLock);
/* Start the next pending request */ /* Start the next pending request */
@ -437,6 +443,9 @@ SpiGetNextRequestFromLun(
else else
{ {
/* Release the spinlock */ /* Release the spinlock */
if (OldIrql != NULL)
KeReleaseSpinLock(&DeviceExtension->SpinLock, *OldIrql);
else
KeReleaseSpinLockFromDpcLevel(&DeviceExtension->SpinLock); KeReleaseSpinLockFromDpcLevel(&DeviceExtension->SpinLock);
} }
} }