mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
Lock the directory while it is parsed.
svn path=/trunk/; revision=15664
This commit is contained in:
parent
2c5946dd01
commit
717888776f
|
@ -364,6 +364,7 @@ ObpParseDirectory(PVOID Object,
|
|||
PWSTR Start;
|
||||
PWSTR End;
|
||||
PVOID FoundObject;
|
||||
KIRQL oldlvl;
|
||||
|
||||
DPRINT("ObpParseDirectory(Object %x, Path %x, *Path %S)\n",
|
||||
Object,Path,*Path);
|
||||
|
@ -385,9 +386,11 @@ ObpParseDirectory(PVOID Object,
|
|||
*End = 0;
|
||||
}
|
||||
|
||||
KeAcquireSpinLock(&(((PDIRECTORY_OBJECT)Object)->Lock), &oldlvl);
|
||||
FoundObject = ObpFindEntryDirectory(Object, Start, Attributes);
|
||||
if (FoundObject == NULL)
|
||||
{
|
||||
KeReleaseSpinLock(&(((PDIRECTORY_OBJECT)Object)->Lock), oldlvl);
|
||||
if (End != NULL)
|
||||
{
|
||||
*End = L'\\';
|
||||
|
@ -399,7 +402,7 @@ ObpParseDirectory(PVOID Object,
|
|||
STANDARD_RIGHTS_REQUIRED,
|
||||
NULL,
|
||||
UserMode);
|
||||
|
||||
KeReleaseSpinLock(&(((PDIRECTORY_OBJECT)Object)->Lock), oldlvl);
|
||||
if (End != NULL)
|
||||
{
|
||||
*End = L'\\';
|
||||
|
|
Loading…
Reference in a new issue