]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Cache bypass: remove ifdefs under src/afs/LINUX
authorMarc Dionne <marc.c.dionne@gmail.com>
Tue, 23 Nov 2010 23:21:16 +0000 (18:21 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 12 Jan 2011 14:15:30 +0000 (06:15 -0800)
Compile cache bypass code unconditionally under src/afs/LINUX
since it is now always enabled.  Also remove syslog messages
about a "cache bypass patched module" when loading and unloading
the module.

Reviewed-on: http://gerrit.openafs.org/3373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9657695d34badaac654227be8c731a1512f2106b)

Change-Id: I57c44352f11ca7f68f6c3644345a7d48da8c1bf9
Reviewed-on: http://gerrit.openafs.org/3645
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c

index 204cc21af30e456a53444619dbc5fa1c51e6412a..d4b8b8ff9af6ecd4db506215246f576f458fa090 100644 (file)
@@ -602,19 +602,20 @@ afs_linux_flush(struct file *fp)
     code = afs_InitReq(&treq, credp);
     if (code)
        goto out;
-       /* If caching is bypassed for this file, or globally, just return 0 */
-       if(cache_bypass_strategy == ALWAYS_BYPASS_CACHE)
-               bypasscache = 1;
-       else {
-               ObtainReadLock(&vcp->lock);
-               if(vcp->cachingStates & FCSBypass)
-                       bypasscache = 1;
-               ReleaseReadLock(&vcp->lock);
-       }
-       if(bypasscache) {
-            /* future proof: don't rely on 0 return from afs_InitReq */
-            code = 0; goto out;
-        }
+    /* If caching is bypassed for this file, or globally, just return 0 */
+    if (cache_bypass_strategy == ALWAYS_BYPASS_CACHE)
+       bypasscache = 1;
+    else {
+       ObtainReadLock(&vcp->lock);
+       if (vcp->cachingStates & FCSBypass)
+           bypasscache = 1;
+       ReleaseReadLock(&vcp->lock);
+    }
+    if (bypasscache) {
+       /* future proof: don't rely on 0 return from afs_InitReq */
+       code = 0;
+       goto out;
+    }
 
     ObtainSharedLock(&vcp->lock, 535);
     if ((vcp->execsOrWriters > 0) && (file_count(fp) == 1)) {