mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
Reset the permanent flag if the object is changed to non permanent.
svn path=/trunk/; revision=15665
This commit is contained in:
parent
717888776f
commit
6ec730fc4c
|
@ -223,12 +223,19 @@ ObpSetPermanentObject (IN PVOID ObjectBody, IN BOOLEAN Permanent)
|
||||||
POBJECT_HEADER ObjectHeader;
|
POBJECT_HEADER ObjectHeader;
|
||||||
|
|
||||||
ObjectHeader = BODY_TO_HEADER(ObjectBody);
|
ObjectHeader = BODY_TO_HEADER(ObjectBody);
|
||||||
ObjectHeader->Flags |= OB_FLAG_PERMANENT;
|
ASSERT (ObjectHeader->PointerCount > 0);
|
||||||
|
if (Permanent)
|
||||||
if (ObjectHeader->HandleCount == 0 && !Permanent && HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory)
|
|
||||||
{
|
{
|
||||||
/* Remove the object from the namespace */
|
ObjectHeader->Flags |= OB_FLAG_PERMANENT;
|
||||||
ObpRemoveEntryDirectory(ObjectHeader);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ObjectHeader->Flags &= ~OB_FLAG_PERMANENT;
|
||||||
|
if (ObjectHeader->HandleCount == 0 && HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory)
|
||||||
|
{
|
||||||
|
/* Remove the object from the namespace */
|
||||||
|
ObpRemoveEntryDirectory(ObjectHeader);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue