Windows: AFSPrimaryVolumeWorkerThread AFSRemoveFcb
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 3 Oct 2012 01:11:01 +0000 (21:11 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 19 Oct 2012 12:55:20 +0000 (05:55 -0700)
Do not call AFSRemoveFcb() on a directory entry whose Fcb
has a non-zero use count.

Change-Id: I0d733327c094f15a7b681eb1806a4fa9a4a6c151
Reviewed-on: http://gerrit.openafs.org/8223
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/AFSWorker.cpp

index bb075ac..869e145 100644 (file)
@@ -1171,7 +1171,10 @@ AFSPrimaryVolumeWorkerThread( IN PVOID Context)
                                                 FALSE))
                             {
 
-                                if ( pCurrentObject->ObjectReferenceCount <= 0)
+                                if ( pCurrentObject->ObjectReferenceCount <= 0 &&
+                                     ( pCurrentObject->Fcb == NULL ||
+                                       pCurrentObject->Fcb->OpenReferenceCount == 0 &&
+                                       pCurrentObject->Fcb->Specific.File.ExtentCount == 0))
                                 {
 
                                     AFSRemoveFcb( &pCurrentObject->Fcb);