Windows: AFSInitFcb Check ObjectInfo->Fcb for NULL

Now that AFSInitFcb is called under the ObjectInfoLock, it is
once again safe to perform a test for ObjectInfo->Fcb != NULL
and return immediately if an Fcb is already assigned.

Change-Id: Id926b9ccf24c7761dbeacf42c53d7cc7d1375482
Reviewed-on: http://gerrit.openafs.org/8226
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Jeffrey Altman 2012-10-07 10:23:19 -04:00
parent 9eb4bcfced
commit 05fa1202fb

View File

@ -47,7 +47,7 @@
//
// Return:
//
// A status is returned for the function
// Return Fcb->NPFcb->Resource held exclusive
//
NTSTATUS
@ -74,6 +74,15 @@ AFSInitFcb( IN AFSDirectoryCB *DirEntry)
pVolumeCB = pObjectInfo->VolumeCB;
if ( pObjectInfo->Fcb != NULL)
{
AFSAcquireExcl( &pObjectInfo->Fcb->NPFcb->Resource,
TRUE);
try_return( ntStatus = STATUS_SUCCESS);
}
//
// Allocate the Fcb and the nonpaged portion of the Fcb.
//