mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +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
1 changed files with 12 additions and 5 deletions
|
@ -223,12 +223,19 @@ ObpSetPermanentObject (IN PVOID ObjectBody, IN BOOLEAN Permanent)
|
|||
POBJECT_HEADER ObjectHeader;
|
||||
|
||||
ObjectHeader = BODY_TO_HEADER(ObjectBody);
|
||||
ObjectHeader->Flags |= OB_FLAG_PERMANENT;
|
||||
|
||||
if (ObjectHeader->HandleCount == 0 && !Permanent && HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory)
|
||||
ASSERT (ObjectHeader->PointerCount > 0);
|
||||
if (Permanent)
|
||||
{
|
||||
/* Remove the object from the namespace */
|
||||
ObpRemoveEntryDirectory(ObjectHeader);
|
||||
ObjectHeader->Flags |= OB_FLAG_PERMANENT;
|
||||
}
|
||||
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