mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[NTOSKRNL]
Actually remove the matching exclusive lock region when unlocking. svn path=/trunk/; revision=56732
This commit is contained in:
parent
23a661296c
commit
e04fd2b536
1 changed files with 18 additions and 3 deletions
|
@ -579,8 +579,8 @@ FsRtlPrivateLock(IN PFILE_LOCK FileLock,
|
||||||
&FileObject->FileName,
|
&FileObject->FileName,
|
||||||
Conflict->Exclusive.FileLock.StartingByte.HighPart,
|
Conflict->Exclusive.FileLock.StartingByte.HighPart,
|
||||||
Conflict->Exclusive.FileLock.StartingByte.LowPart,
|
Conflict->Exclusive.FileLock.StartingByte.LowPart,
|
||||||
Conflict->Exclusive.FileLock.StartingByte.HighPart,
|
Conflict->Exclusive.FileLock.EndingByte.HighPart,
|
||||||
Conflict->Exclusive.FileLock.StartingByte.LowPart,
|
Conflict->Exclusive.FileLock.EndingByte.LowPart,
|
||||||
Conflict->Exclusive.FileLock.ExclusiveLock);
|
Conflict->Exclusive.FileLock.ExclusiveLock);
|
||||||
if (!ExclusiveLock)
|
if (!ExclusiveLock)
|
||||||
{
|
{
|
||||||
|
@ -824,6 +824,14 @@ FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock,
|
||||||
DPRINT("Range not locked %wZ\n", &FileObject->FileName);
|
DPRINT("Range not locked %wZ\n", &FileObject->FileName);
|
||||||
return STATUS_RANGE_NOT_LOCKED;
|
return STATUS_RANGE_NOT_LOCKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DPRINT("Found lock entry: Exclusive %d %08x%08x:%08x%08x %wZ\n",
|
||||||
|
Entry->Exclusive.FileLock.ExclusiveLock,
|
||||||
|
Entry->Exclusive.FileLock.StartingByte.HighPart,
|
||||||
|
Entry->Exclusive.FileLock.StartingByte.LowPart,
|
||||||
|
Entry->Exclusive.FileLock.EndingByte.HighPart,
|
||||||
|
Entry->Exclusive.FileLock.EndingByte.LowPart,
|
||||||
|
&FileObject->FileName);
|
||||||
|
|
||||||
if (Entry->Exclusive.FileLock.ExclusiveLock)
|
if (Entry->Exclusive.FileLock.ExclusiveLock)
|
||||||
{
|
{
|
||||||
|
@ -837,6 +845,8 @@ FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock,
|
||||||
return STATUS_RANGE_NOT_LOCKED;
|
return STATUS_RANGE_NOT_LOCKED;
|
||||||
}
|
}
|
||||||
RtlCopyMemory(&Find, Entry, sizeof(Find));
|
RtlCopyMemory(&Find, Entry, sizeof(Find));
|
||||||
|
// Remove the old exclusive lock region
|
||||||
|
RtlDeleteElementGenericTable(&InternalInfo->RangeTable, Entry);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -882,7 +892,12 @@ FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsListEmpty(&InternalInfo->SharedLocks)) {
|
if (IsListEmpty(&InternalInfo->SharedLocks)) {
|
||||||
DPRINT("Removing the lock entry %wZ\n", &FileObject->FileName);
|
DPRINT("Removing the lock entry %wZ (%08x%08x:%08x%08x)\n",
|
||||||
|
&FileObject->FileName,
|
||||||
|
Entry->Exclusive.FileLock.StartingByte.HighPart,
|
||||||
|
Entry->Exclusive.FileLock.StartingByte.LowPart,
|
||||||
|
Entry->Exclusive.FileLock.EndingByte.HighPart,
|
||||||
|
Entry->Exclusive.FileLock.EndingByte.LowPart);
|
||||||
RtlDeleteElementGenericTable(&InternalInfo->RangeTable, Entry);
|
RtlDeleteElementGenericTable(&InternalInfo->RangeTable, Entry);
|
||||||
} else {
|
} else {
|
||||||
DPRINT("Lock still has:\n");
|
DPRINT("Lock still has:\n");
|
||||||
|
|
Loading…
Reference in a new issue