Windows: DirOpenReferenceCount reorganizing completed
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 29 Dec 2012 05:57:31 +0000 (00:57 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 31 Jan 2013 19:25:40 +0000 (11:25 -0800)
commitc0627f8620594191ce5901937175c5f1a93daec2
tree719ecd44cdda32c10f85b551d516c89b610a5563
parent9f0f9d9ecea59b76c1794b405ab43eeb99edfe68
Windows: DirOpenReferenceCount reorganizing completed

This patchset completes the reorganizing of the DirOpenReferenceCount
handling.  Now that every AFSCcb is given a refCount in AFSInitCcb()
which is released in AFSRemoveCcb() it is possible to simplify some
of the logic surrounding DirOpenReferenceCount handling across
the AFSCommonCreate -> XXX -> AFSLocateNameEntry -> {MountPoint, Symlink}
call sequences.

Wherever possible releasing of DirOpenReferenceCounts occur in a
functions try_exit block.  AFSCommonCreate() uses the new variables
bReleaseDir and bReleaseParentDir to track whether these refcounts
need to be released.  Additional comments document the decision
making.

There was at least one code path in AFSLocateNameEntry() where
the DirOpenReferenceCount could be dropped when it should not have
been. (pExistingDirNode == pDirNode).

Change-Id: I266a902ad4c44b4b8e49258c2da4acd2df1f4476
Reviewed-on: http://gerrit.openafs.org/8860
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/AFSCreate.cpp
src/WINNT/afsrdr/kernel/lib/AFSDirControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp
src/WINNT/afsrdr/kernel/lib/AFSNetworkProviderSupport.cpp