Windows: AFSSetRenameInfo DIRENTRY_REF_COUNTING
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 29 Dec 2012 05:49:43 +0000 (00:49 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 31 Jan 2013 19:24:36 +0000 (11:24 -0800)
When logging the result of the DirOpenReferenceCount increment,
use lCount instead of referencing the DirOpenReferenceCount field
which could have been changed.

Change-Id: I2227472bf903c347e505e4e1d8b60d35e176c0df
Reviewed-on: http://gerrit.openafs.org/8858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp

index 786df07..04ec928 100644 (file)
@@ -2875,7 +2875,6 @@ AFSSetRenameInfo( IN PIRP Irp)
 
             lCount = InterlockedIncrement( &pTargetDirEntry->DirOpenReferenceCount);
 
-
             AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
                           AFS_TRACE_LEVEL_VERBOSE,
                           "AFSSetRenameInfo Increment count on %wZ DE %p Ccb %p Cnt %d\n",
@@ -2903,7 +2902,7 @@ AFSSetRenameInfo( IN PIRP Irp)
                           "AFSSetRenameInfo Target %wZ exists DE %p Count %d, performing delete of target\n",
                           &pTargetDirEntry->NameInformation.FileName,
                           pTargetDirEntry,
-                          pTargetDirEntry->DirOpenReferenceCount);
+                          lCount);
 
             //
             // Pull the directory entry from the parent