Windows: buf_ClearRDRFlag and cm_directIO
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 20 Mar 2013 14:10:03 +0000 (10:10 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 22 Mar 2013 14:30:35 +0000 (07:30 -0700)
When 'cm_directIO' is true, there are no RDR held buffers therefore
there is nothing for buf_ClearRDRFlag() to do.  Do not pass 'Go',
do not obtain cm_scache.rw exclusive nor buf_globalLock shared.
Simply return immediately.

Change-Id: I4c6d1486e3a2bef987a3eb36d8de446e9009e0d2
Reviewed-on: http://gerrit.openafs.org/9638
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/afsd/cm_buf.c

index a3c70a5..418146e 100644 (file)
@@ -2520,6 +2520,9 @@ long buf_ClearRDRFlag(cm_scache_t *scp, char *reason)
     afs_uint32 bcount = 0;
     afs_uint32 i;
 
+    if (!RDR_Initialized || cm_directIO)
+        return 0;
+
     i = BUF_FILEHASH(fidp);
 
     lock_ObtainWrite(&scp->rw);