In the STATUS_NAME_COLLISION error path the DirEntry refcnt must
be incremented because it will be decremented before exit from
AFSLocateName().
Change-Id: I7cf976afa8e62d0d9803549b64a5d0dae27cd9b1
Reviewed-on: http://gerrit.openafs.org/8518
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
pDirEntry->CaseInsensitiveList.fLink != NULL)
{
+ //
+ // Increment our dir entry ref count since we will decrement it on exit
+ //
+
+ lCount = InterlockedIncrement( &pDirEntry->OpenReferenceCount);
+
+ AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
+ AFS_TRACE_LEVEL_VERBOSE,
+ "AFSLocateNameEntry Increment5 count on %wZ DE %p Ccb %p Cnt %d\n",
+ &pDirEntry->NameInformation.FileName,
+ pDirEntry,
+ NULL,
+ lCount);
+
AFSReleaseResource( pParentDirEntry->ObjectInformation->Specific.Directory.DirectoryNodeHdr.TreeLock);
try_return(ntStatus = STATUS_OBJECT_NAME_COLLISION);