Windows: Remove PurgeContent param AFSVerifyEntry
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 14 Apr 2012 03:16:56 +0000 (23:16 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 15 Apr 2012 00:58:57 +0000 (17:58 -0700)
When verifying a directory entry we must update the metadata
for a file therefore we must also purge the data if the version
number changed.  This is not optional.

Change-Id: Icb673c7a6c52b3778978248fcb243d110685aa8d
Reviewed-on: http://gerrit.openafs.org/7208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.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/Include/AFSCommon.h

index 6e0e94c..def89e9 100644 (file)
@@ -1380,7 +1380,6 @@ AFSOpenRoot( IN PIRP Irp,
 
         ntStatus = AFSValidateEntry( VolumeCB->DirectoryCB,
                                      AuthGroup,
-                                     TRUE,
                                      FALSE);
 
         if( !NT_SUCCESS( ntStatus))
@@ -2562,7 +2561,6 @@ AFSProcessOpen( IN PIRP Irp,
 
         ntStatus = AFSValidateEntry( DirectoryCB,
                                      AuthGroup,
-                                     TRUE,
                                      FALSE);
 
         if( !NT_SUCCESS( ntStatus))
@@ -3072,7 +3070,6 @@ AFSProcessOverwriteSupersede( IN PDEVICE_OBJECT DeviceObject,
 
         ntStatus = AFSValidateEntry( DirectoryCB,
                                      AuthGroup,
-                                     TRUE,
                                      FALSE);
 
         if( !NT_SUCCESS( ntStatus))
index 82139d1..cb89958 100644 (file)
@@ -724,7 +724,6 @@ AFSQueryDirectory( IN PIRP Irp)
 
             AFSValidateEntry( pDirEntry,
                               &pCcb->AuthGroup,
-                              FALSE,
                               FALSE);
 
             pObjectInfo = pDirEntry->ObjectInformation;
index df8879a..d38387c 100644 (file)
@@ -3716,7 +3716,6 @@ try_exit:
 NTSTATUS
 AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                   IN GUID *AuthGroup,
-                  IN BOOLEAN PurgeContent,
                   IN BOOLEAN FastCall)
 {
 
@@ -3737,13 +3736,12 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
 
         AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                       AFS_TRACE_LEVEL_VERBOSE_2,
-                      "AFSValidateEntry Validating entry %wZ FID %08lX-%08lX-%08lX-%08lX PurgeContent %u FastCall %u\n",
+                      "AFSValidateEntry Validating entry %wZ FID %08lX-%08lX-%08lX-%08lX FastCall %u\n",
                       &DirEntry->NameInformation.FileName,
                       pObjectInfo->FileId.Cell,
                       pObjectInfo->FileId.Volume,
                       pObjectInfo->FileId.Vnode,
                       pObjectInfo->FileId.Unique,
-                      PurgeContent,
                       FastCall);
 
         //
@@ -3815,8 +3813,7 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
 
         AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
                       AFS_TRACE_LEVEL_VERBOSE,
-                      "AFSValidateEntry Validating entry Purge %d FastCall %d %wZ FID %08lX-%08lX-%08lX-%08lX DV %I64X returned DV %I64X FT %d\n",
-                      PurgeContent,
+                      "AFSValidateEntry Validating entry FastCall %d %wZ FID %08lX-%08lX-%08lX-%08lX DV %I64X returned DV %I64X FT %d\n",
                       FastCall,
                       &DirEntry->NameInformation.FileName,
                       pObjectInfo->FileId.Cell,
@@ -3883,10 +3880,9 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                 // Can't hold the Fcb resource while doing this
                 //
 
-                if( PurgeContent &&
-                    pObjectInfo->Fcb != NULL &&
+                if( pObjectInfo->Fcb != NULL &&
                     (pObjectInfo->DataVersion.QuadPart != pDirEnumEntry->DataVersion.QuadPart ||
-                    BooleanFlagOn( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY_DATA)))
+                      BooleanFlagOn( pObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY_DATA)))
                 {
 
                     pCurrentFcb = pObjectInfo->Fcb;
@@ -4042,7 +4038,6 @@ AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                                         (PCC_FILE_SIZES)&pObjectInfo->Fcb->Header.AllocationSize);
                     }
                 }
-
                 break;
             }
 
index ab3eb8e..f98494e 100644 (file)
@@ -1194,7 +1194,6 @@ AFSUpdateMetaData( IN AFSDirectoryCB *DirEntry,
 NTSTATUS
 AFSValidateEntry( IN AFSDirectoryCB *DirEntry,
                   IN GUID *AuthGroup,
-                  IN BOOLEAN PurgeContent,
                   IN BOOLEAN FastCall);
 
 AFSDirectoryCB *