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,14 +223,21 @@ ObpSetPermanentObject (IN PVOID ObjectBody, IN BOOLEAN Permanent)
|
|||
POBJECT_HEADER ObjectHeader;
|
||||
|
||||
ObjectHeader = BODY_TO_HEADER(ObjectBody);
|
||||
ASSERT (ObjectHeader->PointerCount > 0);
|
||||
if (Permanent)
|
||||
{
|
||||
ObjectHeader->Flags |= OB_FLAG_PERMANENT;
|
||||
|
||||
if (ObjectHeader->HandleCount == 0 && !Permanent && HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory)
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjectHeader->Flags &= ~OB_FLAG_PERMANENT;
|
||||
if (ObjectHeader->HandleCount == 0 && HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory)
|
||||
{
|
||||
/* Remove the object from the namespace */
|
||||
ObpRemoveEntryDirectory(ObjectHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* NAME EXPORTED
|
||||
|
|
Loading…
Reference in a new issue