Windows: Handle AFSLocateNameEntry() STATUS_REPARSE
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 3 Dec 2012 14:11:14 +0000 (09:11 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 3 Dec 2012 22:07:39 +0000 (14:07 -0800)
AFSLocateNameEntry() can return STATUS_REPARSE in addition to
NTSTATUS failure codes.  As in the case of an NTSTATUS code other
than STATUS_OBJECT_NAME_NOT_FOUND, the reference counts are decremented in
AFSLocateNameEntry() if STATUS_REPARSE is returned.

Change-Id: I7cab5be2ae304be47cb14abb4f6952e4e0e65efe
Reviewed-on: http://gerrit.openafs.org/8580
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/AFSGeneric.cpp

index 15af3e2..f524fa1 100644 (file)
@@ -6334,11 +6334,12 @@ AFSRetrieveFileAttributes( IN AFSDirectoryCB *ParentDirectoryCB,
                                        &pDirectoryEntry,
                                        NULL);
 
-        if( !NT_SUCCESS( ntStatus))
+        if( !NT_SUCCESS( ntStatus) ||
+            ntStatus == STATUS_REPARSE)
         {
 
             //
-            // The volume lock was released on failure above
+            // The volume lock was released on failure or reparse above
             // Except for STATUS_OBJECT_NAME_NOT_FOUND
             //
 
@@ -6998,11 +6999,12 @@ AFSEvaluateRootEntry( IN AFSDirectoryCB *DirectoryCB,
                                        &pDirectoryEntry,
                                        NULL);
 
-        if( !NT_SUCCESS( ntStatus))
+        if( !NT_SUCCESS( ntStatus) ||
+            ntStatus == STATUS_REPARSE)
         {
 
             //
-            // The volume lock was released on failure above
+            // The volume lock was released on failure or reparse above
             // Except for STATUS_OBJECT_NAME_NOT_FOUND
             //
 
@@ -8432,11 +8434,12 @@ AFSGetObjectStatus( IN AFSGetStatusInfoCB *GetStatusInfo,
                                            &pDirectoryEntry,
                                            NULL);
 
-            if( !NT_SUCCESS( ntStatus))
+            if( !NT_SUCCESS( ntStatus) ||
+                ntStatus == STATUS_REPARSE)
             {
 
                 //
-                // The volume lock was released on failure above
+                // The volume lock was released on failure or reparse above
                 // Except for STATUS_OBJECT_NAME_NOT_FOUND
                 //