]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: AFSInitFcb Check ObjectInfo->Fcb for NULL
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 7 Oct 2012 14:23:19 +0000 (10:23 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 19 Oct 2012 14:03:31 +0000 (07:03 -0700)
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>
src/WINNT/afsrdr/kernel/lib/AFSFcbSupport.cpp

index 83faba82e877220fa2f0f03b4670c9719126a4a3..b3dee29dd67c548e400d3cca22b9b9a287b372c2 100644 (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.
         //