From c2e063e2746112e5586cc3f8662567abff353b2d Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Thu, 14 Oct 2010 18:45:32 -0400 Subject: [PATCH] LINUX/osi_vnodeops.c: minor coding style fixes Re-indent and correct a few coding style issues in this section of code. In particular, it clears up possible confusion on the scope of the preceding if statement. Purely cosmetic, no functional changes. Change-Id: Id6dea6326c9878b41f821de00267f75195fea394 Reviewed-on: http://gerrit.openafs.org/2989 Reviewed-by: Matt Benjamin Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/afs/LINUX/osi_vnodeops.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index de864bc..e16092f 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -607,19 +607,20 @@ afs_linux_flush(struct file *fp) if (code) goto out; #if defined(AFS_CACHE_BYPASS) - /* 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; + } #endif ObtainSharedLock(&vcp->lock, 535); -- 1.9.4