[OpenAFS] Solaris 10/SMF

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Fri, 14 Oct 2005 19:16:02 -0400


In message <200510142223.j9EMNZMG018807@cmf.nrl.navy.mil>,"chas williams - CONT
RACTOR" writes:
>"not an afs inode".  but the following little patch fixes that problem.

i never get locking right on the first try.  this is a bit more stable.

Index: src/afs/afs_pioctl.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_pioctl.c,v
retrieving revision 1.81.2.18
diff -u -u -r1.81.2.18 afs_pioctl.c
--- src/afs/afs_pioctl.c	21 Jul 2005 04:49:18 -0000	1.81.2.18
+++ src/afs/afs_pioctl.c	14 Oct 2005 23:15:21 -0000
@@ -967,6 +967,19 @@
     } else
 	vp = NULL;
 
+#if defined(AFS_SUN510_ENV)
+    if (vp && !IsAfsVnode(vp)) {
+	struct vnode *realvp;
+
+	if (VOP_REALVP(vp, &realvp) == 0) {
+	    struct vnode *oldvp = vp;
+
+	    VN_HOLD(realvp);
+	    vp = realvp;
+	    AFS_RELE(oldvp);
+	}
+    }
+#endif
     /* now make the call if we were passed no file, or were passed an AFS file */
     if (!vp || IsAfsVnode(vp)) {
 #if defined(AFS_SUN5_ENV)