]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vnop-ifdef-cleanup-20060403
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Tue, 4 Apr 2006 02:35:15 +0000 (02:35 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 4 Apr 2006 02:35:15 +0000 (02:35 +0000)
make this less messy

src/afs/VNOPS/afs_vnop_write.c

index 8392169bceaa6ac3b4807cfd607848c339807dbb..e40e41ab9e06b2c87afb1ab523c895f9f960aa6b 100644 (file)
@@ -873,15 +873,6 @@ afs_close(OSI_VC_ARG(avc), aflags, acred)
        afs_PutFakeStat(&fakestat);
        return 0;
     }
-#elif  defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-    if (count > 1) {
-       /* The vfs layer may call this repeatedly with higher "count"; only on the last close (i.e. count = 1) we should actually proceed with the close. */
-       afs_PutFakeStat(&fakestat);
-       return 0;
-    }
-#endif
-#ifndef        AFS_SUN5_ENV
-#if defined(AFS_SGI_ENV)
     /* unlock any locks for pid - could be wrong for child .. */
     AFS_RWLOCK((vnode_t *) avc, VRWLOCK_WRITE);
 #ifdef AFS_SGI65_ENV
@@ -898,6 +889,12 @@ afs_close(OSI_VC_ARG(avc), aflags, acred)
 #endif /* AFS_SGI65_ENV */
     /* afs_chkpgoob will drop and re-acquire the global lock. */
     afs_chkpgoob(&avc->v, btoc(avc->m.Length));
+#elif  defined(AFS_SUN5_ENV)
+    if (count > 1) {
+       /* The vfs layer may call this repeatedly with higher "count"; only on the last close (i.e. count = 1) we should actually proceed with the close. */
+       afs_PutFakeStat(&fakestat);
+       return 0;
+    }
 #else /* AFS_SGI_ENV */
     if (avc->flockCount) {     /* Release Lock */
 #if    defined(AFS_OSF_ENV) 
@@ -907,7 +904,6 @@ afs_close(OSI_VC_ARG(avc), aflags, acred)
 #endif
     }
 #endif /* AFS_SGI_ENV */
-#endif /* AFS_SUN5_ENV */
     if (aflags & (FWRITE | FTRUNC)) {
        if (afs_BBusy()) {
            /* do it yourself if daemons are all busy */