mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[NTOSKRNL/IO]
- Always use interlocked operations on DeviceObject->ReferenceCount svn path=/trunk/; revision=55128
This commit is contained in:
parent
d68b29a234
commit
2ea0f55590
2 changed files with 2 additions and 2 deletions
|
@ -486,7 +486,7 @@ IopDereferenceDeviceObject(IN PDEVICE_OBJECT DeviceObject,
|
|||
ASSERT(DeviceObject->ReferenceCount);
|
||||
|
||||
/* Dereference the device */
|
||||
DeviceObject->ReferenceCount--;
|
||||
InterlockedDecrement(&DeviceObject->ReferenceCount);
|
||||
|
||||
/*
|
||||
* Check if we can unload it and it's safe to unload (or if we're forcing
|
||||
|
|
|
@ -157,7 +157,7 @@ IopCheckDeviceAndDriver(IN POPEN_PACKET OpenPacket,
|
|||
else
|
||||
{
|
||||
/* Increase reference count */
|
||||
DeviceObject->ReferenceCount++;
|
||||
InterlockedIncrement(&DeviceObject->ReferenceCount);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue