From: Marc Dionne Date: Thu, 14 Oct 2010 22:45:32 +0000 (-0400) Subject: LINUX/osi_vnodeops.c: minor coding style fixes X-Git-Tag: upstream/1.8.0_pre1^2~4665 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c2e063e2746112e5586cc3f8662567abff353b2d;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index de864bcb6..e16092f6e 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);