add pathconf
[unix-history] / usr / src / sys / nfs / nfs_node.c
index 52f4b0c..0414bc2 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)nfs_node.c  7.44 (Berkeley) %G%
+ *     @(#)nfs_node.c  7.48 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -134,6 +134,7 @@ nfs_inactive(ap)
 {
        register struct nfsnode *np;
        register struct sillyrename *sp;
 {
        register struct nfsnode *np;
        register struct sillyrename *sp;
+       struct proc *p = curproc;       /* XXX */
        extern int prtactive;
 
        np = VTONFS(ap->a_vp);
        extern int prtactive;
 
        np = VTONFS(ap->a_vp);
@@ -145,6 +146,7 @@ nfs_inactive(ap)
                /*
                 * Remove the silly file that was rename'd earlier
                 */
                /*
                 * Remove the silly file that was rename'd earlier
                 */
+               (void) nfs_vinvalbuf(ap->a_vp, 0, sp->s_cred, p, 1);
                nfs_removeit(sp);
                crfree(sp->s_cred);
                vrele(sp->s_dvp);
                nfs_removeit(sp);
                crfree(sp->s_cred);
                vrele(sp->s_dvp);
@@ -152,7 +154,8 @@ nfs_inactive(ap)
                free((caddr_t)sp, M_NFSREQ);
 #endif
        }
                free((caddr_t)sp, M_NFSREQ);
 #endif
        }
-       np->n_flag &= NMODIFIED;
+       np->n_flag &= (NMODIFIED | NFLUSHINPROG | NFLUSHWANT | NQNFSEVICTED |
+               NQNFSNONCACHE | NQNFSWRITE);
        return (0);
 }
 
        return (0);
 }
 
@@ -206,7 +209,19 @@ nfs_lock(ap)
                struct vnode *a_vp;
        } */ *ap;
 {
                struct vnode *a_vp;
        } */ *ap;
 {
+       register struct vnode *vp = ap->a_vp;
 
 
+       /*
+        * Ugh, another place where interruptible mounts will get hung.
+        * If you make this sleep interruptible, then you have to fix all
+        * the VOP_LOCK() calls to expect interruptibility.
+        */
+       while (vp->v_flag & VXLOCK) {
+               vp->v_flag |= VXWANT;
+               sleep((caddr_t)vp, PINOD);
+       }
+       if (vp->v_tag == VT_NON)
+               return (ENOENT);
        return (0);
 }
 
        return (0);
 }