SOLARIS: Avoid open count cleanup for Solaris 11
authorAndrew Deason <adeason@sinenomine.net>
Tue, 8 Jan 2013 23:50:57 +0000 (17:50 -0600)
committerDerrick Brashear <shadow@your-file-system.com>
Wed, 9 Jan 2013 15:07:54 +0000 (07:07 -0800)
The comments in here no longer apply to Solaris, as of OpenSolaris
commit 11736:63a134e1f09c by Donghai Qiao (4492533 Filesystems may
need VOP_CLOSE() for executables following a VOP_OPEN()). This means
that this workaround should no longer be necessary for any Solaris 11
release, any illumos release, and anything else based off of
OpenSolaris. So, stop doing it.

Thanks to Frank Batschulat for pointing this out, and providing all of
the details.

Change-Id: I54ed545e3b9d858fbffc762246ae805cd9c63a64
Reviewed-on: http://gerrit.openafs.org/8895
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/afs/SOLARIS/osi_vnodeops.c

index 068a4b3..2d71f97 100644 (file)
@@ -1675,6 +1675,7 @@ afs_inactive(struct vcache *avc, afs_ucred_t *acred)
     }
     mutex_exit(&vp->v_lock);
 
+#ifndef AFS_SUN511_ENV
     /*
      * Solaris calls VOP_OPEN on exec, but doesn't call VOP_CLOSE when
      * the executable exits.  So we clean up the open count here.
@@ -1685,6 +1686,7 @@ afs_inactive(struct vcache *avc, afs_ucred_t *acred)
      */
     if (avc->opens > 0 && avc->mvstat == 0 && !(avc->f.states & CCore))
        avc->opens = avc->execsOrWriters = 0;
+#endif
 
     afs_InactiveVCache(avc, acred);