- if (nofp->nof_flags & NFS_OPEN_FILE_BUSY) {
- if (!vname)
- vname = vnode_getname(vp);
- printf("nfs_vnop_reclaim: open file busy: %s\n",
- vname ? vname : "//");
- }
- if (nofp->nof_opencnt) {
- if (!vname)
- vname = vnode_getname(vp);
- printf("nfs_vnop_reclaim: file still open: %d %s\n",
- nofp->nof_opencnt, vname ? vname : "//");
- }
- if (nofp->nof_access || nofp->nof_deny ||
- nofp->nof_mmap_access || nofp->nof_mmap_deny ||
- nofp->nof_r || nofp->nof_w || nofp->nof_rw ||
- nofp->nof_r_dw || nofp->nof_w_dw || nofp->nof_rw_dw ||
- nofp->nof_r_drw || nofp->nof_w_drw || nofp->nof_rw_drw) {
- if (!vname)
- vname = vnode_getname(vp);
- printf("nfs_vnop_reclaim: non-zero access: %d %d %d %d # %u %u %u dw %u %u %u drw %u %u %u %s\n",
- nofp->nof_access, nofp->nof_deny,
- nofp->nof_mmap_access, nofp->nof_mmap_deny,
- nofp->nof_r, nofp->nof_w, nofp->nof_rw,
- nofp->nof_r_dw, nofp->nof_w_dw, nofp->nof_rw_dw,
- nofp->nof_r_drw, nofp->nof_w_drw, nofp->nof_rw_drw,
- vname ? vname : "//");
+ if (nofp->nof_flags & NFS_OPEN_FILE_BUSY)
+ NP(np, "nfs_vnop_reclaim: open file busy");
+ if (!(np->n_flag & NREVOKE) && !(nofp->nof_flags & NFS_OPEN_FILE_LOST)) {
+ if (nofp->nof_opencnt && !force)
+ NP(np, "nfs_vnop_reclaim: file still open: %d", nofp->nof_opencnt);
+ if (!force && (nofp->nof_access || nofp->nof_deny ||
+ nofp->nof_mmap_access || nofp->nof_mmap_deny ||
+ nofp->nof_r || nofp->nof_w || nofp->nof_rw ||
+ nofp->nof_r_dw || nofp->nof_w_dw || nofp->nof_rw_dw ||
+ nofp->nof_r_drw || nofp->nof_w_drw || nofp->nof_rw_drw ||
+ nofp->nof_d_r || nofp->nof_d_w || nofp->nof_d_rw ||
+ nofp->nof_d_r_dw || nofp->nof_d_w_dw || nofp->nof_d_rw_dw ||
+ nofp->nof_d_r_drw || nofp->nof_d_w_drw || nofp->nof_d_rw_drw)) {
+ NP(np, "nfs_vnop_reclaim: non-zero access: %d %d %d %d # %u.%u %u.%u %u.%u dw %u.%u %u.%u %u.%u drw %u.%u %u.%u %u.%u",
+ nofp->nof_access, nofp->nof_deny,
+ nofp->nof_mmap_access, nofp->nof_mmap_deny,
+ nofp->nof_r, nofp->nof_d_r,
+ nofp->nof_w, nofp->nof_d_w,
+ nofp->nof_rw, nofp->nof_d_rw,
+ nofp->nof_r_dw, nofp->nof_d_r_dw,
+ nofp->nof_w_dw, nofp->nof_d_w_dw,
+ nofp->nof_rw_dw, nofp->nof_d_rw_dw,
+ nofp->nof_r_drw, nofp->nof_d_r_drw,
+ nofp->nof_w_drw, nofp->nof_d_w_drw,
+ nofp->nof_rw_drw, nofp->nof_d_rw_drw);
+ /* try sending a close RPC if it wasn't delegated */
+ if (nofp->nof_r || nofp->nof_w || nofp->nof_rw ||
+ nofp->nof_r_dw || nofp->nof_w_dw || nofp->nof_rw_dw ||
+ nofp->nof_r_drw || nofp->nof_w_drw || nofp->nof_rw_drw)
+ nfs4_close_rpc(np, nofp, NULL, nofp->nof_owner->noo_cred, R_RECOVER);
+ }