Windows: AFSRequestExtentsAsync and AFSDoExtentsMapRegion

When calling AFSDoExtentsMapRegion() the FCB ExtentsResource
must be held.   AFSRequestExtentsAsync() failed to hold the
ExtentsResource across the call.

Change-Id: I607cfb45725410c7f079b3be03002b002fccbea4
Reviewed-on: http://gerrit.openafs.org/8220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Jeffrey Altman 2012-10-06 17:36:25 -04:00
parent edef37033c
commit 23c9200669

View File

@ -750,9 +750,31 @@ AFSRequestExtentsAsync( IN AFSFcb *Fcb,
// Check if we are already mapped
//
AFSDbgLogMsg( AFS_SUBSYSTEM_LOCK_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE,
"AFSRequestExtentsAsync Acquiring Fcb extents lock %08lX SHARED %08lX\n",
&pNPFcb->Specific.File.ExtentsResource,
PsGetCurrentThread());
AFSAcquireShared( &pNPFcb->Specific.File.ExtentsResource, TRUE );
bRegionMapped = AFSDoExtentsMapRegion( Fcb, Offset, Size, &pFirstExtent, &pExtent);
if( bRegionMapped)
{
KeClearEvent( &pNPFcb->Specific.File.ExtentsRequestComplete );
}
AFSDbgLogMsg( AFS_SUBSYSTEM_LOCK_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE,
"AFSRequestExtentsAsync Releasing Fcb extents lock %08lX SHARED %08lX\n",
&pNPFcb->Specific.File.ExtentsResource,
PsGetCurrentThread());
AFSReleaseResource( &pNPFcb->Specific.File.ExtentsResource );
if ( bRegionMapped)
{
try_return( ntStatus = STATUS_SUCCESS);