Windows: Do not flush dirty bufs to deleted FID
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 31 Oct 2012 01:54:20 +0000 (21:54 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 31 Oct 2012 22:16:35 +0000 (15:16 -0700)
If the FID is known to have been deleted, drop all dirty data
returned from the redirector on the floor.

Change-Id: I8b9a1a69d632d7243bdbcfedb5329558e0004d2e
Reviewed-on: http://gerrit.openafs.org/8343
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/user/RDRFunction.c

index 83c65ea..24d1483 100644 (file)
@@ -3854,7 +3854,9 @@ RDR_ReleaseFileExtents( IN cm_user_t *userp,
     }
 
     if (scp) {
-        if (ReleaseExtentsCB->Flags & AFS_EXTENT_FLAG_FLUSH) {
+        if (deleted) {
+            code = 0;
+        } else if (ReleaseExtentsCB->Flags & AFS_EXTENT_FLAG_FLUSH) {
             lock_ObtainWrite(&scp->rw);
             code = cm_SyncOp(scp, NULL, userp, &req, PRSFS_WRITE,
                              CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);