hpux-store-fd-sooner-in-iopen-20051107
authorDerrick Brashear <shadow@dementia.org>
Mon, 7 Nov 2005 23:42:02 +0000 (23:42 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 7 Nov 2005 23:42:02 +0000 (23:42 +0000)
do this a little differently, it may change out from under us

src/afs/HPUX/osi_inode.c

index 44f3c49..4c93e08 100644 (file)
@@ -128,6 +128,7 @@ afs_syscall_iopen(dev, inode, usrmod)
     int dummy;
     extern struct fileops vnodefops;
     register int code;
+    int fd;
 
     AFS_STATCNT(afs_syscall_iopen);
 
@@ -144,6 +145,9 @@ afs_syscall_iopen(dev, inode, usrmod)
        iput(ip);
        goto out;
     }
+#ifdef AFS_HPUX1111_ENV
+    fd = u.u_r.r_val1;
+#endif
     iunlock(ip);
 
     fp->f_ops = &vnodefops;
@@ -175,7 +179,9 @@ afs_syscall_iopen(dev, inode, usrmod)
      * called by falloc(), which is called above.
      */
     if (is_multithreaded(u.u_procp)) {
-       int fd = (int)u.u_r.r_val1;
+#ifndef AFS_HPUX1111_ENV
+       fd = (int)u.u_r.r_val1;
+#endif
        putf(fd);
     }