FBSD: remove prtactive
[openafs.git] / src / afs / FBSD / osi_vnodeops.c
index 5a9811b..31e1c4b 100644 (file)
@@ -501,9 +501,7 @@ afs_vop_lookup(ap)
     lockparent = flags & LOCKPARENT;
     wantparent = flags & (LOCKPARENT | WANTPARENT);
 
-#ifdef AFS_FBSD80_ENV
     cnp->cn_flags |= MPSAFE; /* steel */
-#endif
 
 #ifndef AFS_FBSD70_ENV
     if (flags & ISDOTDOT)
@@ -890,12 +888,8 @@ afs_vop_getpages(struct vop_getpages_args *ap)
             * Read operation filled a partial page.
             */
            m->valid = 0;
-           vm_page_set_valid(m, 0, size - toff);
-#ifndef AFS_FBSD80_ENV
-           vm_page_undirty(m);
-#else
+           vm_page_set_validclean(m, 0, size - toff);
            KASSERT(m->dirty == 0, ("afs_getpages: page %p is dirty", m));
-#endif
        }
 
        if (i != ap->a_reqpage) {
@@ -1309,7 +1303,7 @@ afs_vop_mkdir(ap)
     struct vcache *vcp;
 #ifndef AFS_FBSD80_ENV
     struct thread *p = ap->a_cnp->cn_thread;
-#end
+#endif
 
     GETNAME();
 #ifdef DIAGNOSTIC
@@ -1454,8 +1448,6 @@ afs_vop_readlink(ap)
     return error;
 }
 
-extern int prtactive;
-
 int
 afs_vop_inactive(ap)
      struct vop_inactive_args  /* {
@@ -1465,9 +1457,6 @@ afs_vop_inactive(ap)
 {
     struct vnode *vp = ap->a_vp;
 
-    if (prtactive && vp->v_usecount != 0)
-       vprint("afs_vop_inactive(): pushing active", vp);
-
     AFS_GLOCK();
     afs_InactiveVCache(VTOAFS(vp), 0); /* decrs ref counts */
     AFS_GUNLOCK();
@@ -1498,6 +1487,12 @@ afs_vop_reclaim(struct vop_reclaim_args *ap)
        ObtainWriteLock(&afs_xvcache, 901);
     /* reclaim the vnode and the in-memory vcache, but keep the on-disk vcache */
     code = afs_FlushVCache(avc, &slept);
+
+    if (avc->f.states & CVInit) {
+       avc->f.states &= ~CVInit;
+       afs_osi_Wakeup(&avc->f.states);
+    }
+
     if (!haveVlock)
        ReleaseWriteLock(&afs_xvcache);
     if (!haveGlock)