Simplify preprocessor logic in afs_pioctl
authorBen Kaduk <kaduk@mit.edu>
Sun, 20 Jun 2010 22:54:26 +0000 (18:54 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 22 Jun 2010 15:27:48 +0000 (08:27 -0700)
We had identical code in two branches of an if/elif/else path.
Merge them together.
This allows two DARWIN80_ENV blocks to be coalesced; reindent
them correctly while we're here.

Change-Id: Icaa047994ec970ee8187a7811ee69de2f36a0503
Reviewed-on: http://gerrit.openafs.org/2222
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_pioctl.c

index 2f46e17..54d2224 100644 (file)
@@ -3428,17 +3428,13 @@ DECL_PIOCTL(PFlushVolumeData)
                    goto loop;
                }
 #ifdef AFS_DARWIN80_ENV
-           if (tvc->f.states & CDeadVnode) {
-               if (!(tvc->f.states & CBulkFetching)) {
-                   ReleaseReadLock(&afs_xvcache);
-                   afs_osi_Sleep(&tvc->f.states);
-                   goto loop;
+               if (tvc->f.states & CDeadVnode) {
+                   if (!(tvc->f.states & CBulkFetching)) {
+                       ReleaseReadLock(&afs_xvcache);
+                       afs_osi_Sleep(&tvc->f.states);
+                       goto loop;
+                   }
                }
-           }
-#endif
-#if    defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)  || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
-               AFS_FAST_HOLD(tvc);
-#elif defined(AFS_DARWIN80_ENV)
                vp = AFSTOV(tvc);
                if (vnode_get(vp))
                    continue;