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 Start;
|
||||||
PWSTR End;
|
PWSTR End;
|
||||||
PVOID FoundObject;
|
PVOID FoundObject;
|
||||||
|
KIRQL oldlvl;
|
||||||
|
|
||||||
DPRINT("ObpParseDirectory(Object %x, Path %x, *Path %S)\n",
|
DPRINT("ObpParseDirectory(Object %x, Path %x, *Path %S)\n",
|
||||||
Object,Path,*Path);
|
Object,Path,*Path);
|
||||||
|
@ -385,9 +386,11 @@ ObpParseDirectory(PVOID Object,
|
||||||
*End = 0;
|
*End = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeAcquireSpinLock(&(((PDIRECTORY_OBJECT)Object)->Lock), &oldlvl);
|
||||||
FoundObject = ObpFindEntryDirectory(Object, Start, Attributes);
|
FoundObject = ObpFindEntryDirectory(Object, Start, Attributes);
|
||||||
if (FoundObject == NULL)
|
if (FoundObject == NULL)
|
||||||
{
|
{
|
||||||
|
KeReleaseSpinLock(&(((PDIRECTORY_OBJECT)Object)->Lock), oldlvl);
|
||||||
if (End != NULL)
|
if (End != NULL)
|
||||||
{
|
{
|
||||||
*End = L'\\';
|
*End = L'\\';
|
||||||
|
@ -399,7 +402,7 @@ ObpParseDirectory(PVOID Object,
|
||||||
STANDARD_RIGHTS_REQUIRED,
|
STANDARD_RIGHTS_REQUIRED,
|
||||||
NULL,
|
NULL,
|
||||||
UserMode);
|
UserMode);
|
||||||
|
KeReleaseSpinLock(&(((PDIRECTORY_OBJECT)Object)->Lock), oldlvl);
|
||||||
if (End != NULL)
|
if (End != NULL)
|
||||||
{
|
{
|
||||||
*End = L'\\';
|
*End = L'\\';
|
||||||
|
|
Loading…
Reference in a new issue