mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
KDFS-windows-afsrdr-kernel-build-symlink-target-20090109
LICENSE BSD When the target of a symlink is a volume root, we must return the control block of the volume root and not the current fcb which is still referring to the last symlink in the chain. Be sure to hold the TreeLock while we perform the is volume test in order to prevent the volume control block from being torn down.
This commit is contained in:
parent
957cfdf9b9
commit
8be8c18d01
@ -3948,11 +3948,11 @@ AFSBuildSymLinkTarget( IN ULONGLONG ProcessID,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
AFSReleaseResource( &pDevExt->Specific.RDR.VolumeTreeLock);
|
||||
|
||||
if( pVcb == NULL)
|
||||
{
|
||||
|
||||
AFSReleaseResource( &pDevExt->Specific.RDR.VolumeTreeLock);
|
||||
|
||||
if( pCurrentFcb != pTopFcb)
|
||||
{
|
||||
|
||||
@ -3994,11 +3994,15 @@ AFSBuildSymLinkTarget( IN ULONGLONG ProcessID,
|
||||
if( TargetFcb != NULL)
|
||||
{
|
||||
|
||||
*TargetFcb = pCurrentFcb;
|
||||
AFSAcquireExcl( &pVcb->NPFcb->Resource,
|
||||
TRUE);
|
||||
|
||||
AFSReleaseResource( &pTopFcb->NPFcb->Resource);
|
||||
*TargetFcb = pVcb;
|
||||
}
|
||||
else if( pCurrentFcb != pTopFcb)
|
||||
|
||||
AFSReleaseResource( &pDevExt->Specific.RDR.VolumeTreeLock);
|
||||
|
||||
if( pCurrentFcb != pTopFcb)
|
||||
{
|
||||
|
||||
AFSReleaseResource( &pCurrentFcb->NPFcb->Resource);
|
||||
@ -4011,6 +4015,8 @@ AFSBuildSymLinkTarget( IN ULONGLONG ProcessID,
|
||||
break;
|
||||
}
|
||||
|
||||
AFSReleaseResource( &pDevExt->Specific.RDR.VolumeTreeLock);
|
||||
|
||||
//
|
||||
// We have the volume node so now search for the entry itself
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user