- if (vp->v_type == VREG && (np->n_flag & NBUFFERED)) {
- np->n_flag |= NLOCKED;
- nfs_blkflush(vp, (daddr_t)0, np->n_size, TRUE);
- }
- vp->v_type = VNON;
- return (0);
-}
-
-/*
- * Remove any nfsnodes in the nfsnode cache belonging to mount.
- *
- * There should not be any active ones, return error if any are found
- * (nb: this is a user error, not a system err).
- */
-nfs_nflush(mntp)
- struct mount *mntp;
-{
- register struct vnode *vp;
- int busy = 0;
-
- for (vp = mntp->m_mounth; vp; vp = vp->v_mountf) {
- if (vp->v_count) {
- busy++;
- continue;
- }
- /*
- * As v_count == 0, the nfsnode was on the free list already,
- * so it will fall off the bottom eventually.
- * We could perhaps move it to the head of the free list,
- * but as umounts are done so infrequently, we would gain
- * very little, while making the code bigger.
- */
- nfs_reclaim(vp);
+ if ((nmp->nm_flag & NFSMNT_NQNFS) && np->n_tnext) {
+ if (np->n_tnext == (struct nfsnode *)nmp)
+ nmp->nm_tprev = np->n_tprev;
+ else
+ np->n_tnext->n_tprev = np->n_tprev;
+ if (np->n_tprev == (struct nfsnode *)nmp)
+ nmp->nm_tnext = np->n_tnext;
+ else
+ np->n_tprev->n_tnext = np->n_tnext;