Revert "Windows: Media Protected if create on RO volume"
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 29 Oct 2012 13:19:13 +0000 (09:19 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 29 Oct 2012 18:23:07 +0000 (11:23 -0700)
This reverts commit f3f282265a3d9e3c968fd06793e6d1a91337f443.

Returning STATUS_MEDIA_WRITE_PROTECTED in preference to
STATUS_OBJECT_NAME_COLLISION when the file results in silent
failures by some applications (ie, Firefox.exe) when the
first directory in the path below the share name is the
root of a .readonly volume.

FIXES 131416

Change-Id: I342d9ff09ef68615371cf9d372f38fac854ed6c0
Reviewed-on: http://gerrit.openafs.org/8325
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp

index ddb0cd9..ef932c0 100644 (file)
@@ -688,28 +688,6 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject,
               pDirectoryCB == NULL))
         {
 
-            if ( pVolumeCB &&
-                 BooleanFlagOn( pVolumeCB->VolumeInformation.Characteristics, FILE_READ_ONLY_DEVICE))
-            {
-
-                AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
-                              AFS_TRACE_LEVEL_VERBOSE,
-                              "AFSCommonCreate ReadOnly Device on create Status %08lX\n",
-                              ntStatus);
-
-                InterlockedDecrement( &pParentDirectoryCB->OpenReferenceCount);
-
-                AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING,
-                              AFS_TRACE_LEVEL_VERBOSE,
-                              "AFSCommonCreate Decrement13 count on %wZ DE %p Ccb %p Cnt %d\n",
-                              &pParentDirectoryCB->NameInformation.FileName,
-                              pParentDirectoryCB,
-                              NULL,
-                              pParentDirectoryCB->OpenReferenceCount);
-
-                try_return( ntStatus = STATUS_MEDIA_WRITE_PROTECTED);
-            }
-
             if( uniComponentName.Length == 0 ||
                 pDirectoryCB != NULL)
             {