Windows: OpenTargetDirectory AFSInitFcb Reparse Test
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 17 Oct 2012 00:26:43 +0000 (20:26 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 19 Oct 2012 09:46:55 +0000 (02:46 -0700)
In AFSOpenTargetDirectory the test to determine if AFSInitFcb
allocated a FCB or returned an existing one (STATUS_REPARSE)
was reversed.  If AFSInitFcb was called and AFSOpenTargetDirectory
eventually failed, an in use FCB would be freed.

Change-Id: Ie5974fee5202685575f286fe4fef43dfdc0698cb
Reviewed-on: http://gerrit.openafs.org/8244
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/AFSCreate.cpp

index cfaae80..8f8d994 100644 (file)
@@ -2308,7 +2308,7 @@ AFSOpenTargetDirectory( IN PIRP Irp,
 
                 AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                               AFS_TRACE_LEVEL_ERROR,
-                              "AFSProcessCreate (%08lX) Failed to initialize fcb %wZ Status %08lX\n",
+                              "AFSOpenTargetDirectory (%08lX) Failed to initialize fcb %wZ Status %08lX\n",
                               Irp,
                               &ParentDirectoryCB->NameInformation.FileName,
                               ntStatus);
@@ -2316,7 +2316,7 @@ AFSOpenTargetDirectory( IN PIRP Irp,
                 try_return( ntStatus);
             }
 
-            if ( ntStatus == STATUS_REPARSE)
+            if ( ntStatus != STATUS_REPARSE)
             {
 
                 bAllocatedFcb = TRUE;