mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: Missing lock in AFSNotifyRename
If the ParentObjectInformation and TargetParentObjectInformation are different, the TreeLock for each must be held. Change-Id: Iac9910d838f8f35b286e4e40009cfd547ed8a438 Reviewed-on: http://gerrit.openafs.org/8479 Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
8245b2bc7a
commit
d733f9daed
@ -2168,6 +2168,9 @@ AFSNotifyRename( IN AFSObjectInfoCB *ObjectInfo,
|
||||
if ( ParentObjectInfo != TargetParentObjectInfo)
|
||||
{
|
||||
|
||||
AFSAcquireExcl( TargetParentObjectInfo->Specific.Directory.DirectoryNodeHdr.TreeLock,
|
||||
TRUE);
|
||||
|
||||
if ( TargetParentObjectInfo->DataVersion.QuadPart == pRenameResultCB->TargetParentDataVersion.QuadPart - 1)
|
||||
{
|
||||
|
||||
@ -2243,6 +2246,12 @@ AFSNotifyRename( IN AFSObjectInfoCB *ObjectInfo,
|
||||
DirectoryCB->Type.Data.ShortNameTreeEntry.HashIndex = 0;
|
||||
}
|
||||
|
||||
if ( ParentObjectInfo != TargetParentObjectInfo)
|
||||
{
|
||||
|
||||
AFSReleaseResource( TargetParentObjectInfo->Specific.Directory.DirectoryNodeHdr.TreeLock);
|
||||
}
|
||||
|
||||
AFSReleaseResource( ParentObjectInfo->Specific.Directory.DirectoryNodeHdr.TreeLock);
|
||||
|
||||
if( UpdatedFID != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user