+ if (nofp->nof_r) {
+ denyMode = NFS_OPEN_SHARE_DENY_NONE;
+ } else if (nofp->nof_r_dw) {
+ denyMode = NFS_OPEN_SHARE_DENY_WRITE;
+ } else if (nofp->nof_r_drw) {
+ denyMode = NFS_OPEN_SHARE_DENY_BOTH;
+ }
+ } else if (nofp->nof_d_rw || nofp->nof_d_rw_dw || nofp->nof_d_rw_drw) {
+ /*
+ * This clause and the one below is to co-opt a read write access
+ * for a read only mmaping. We probably got here in that an
+ * existing rw open for an executable file already exists.
+ */
+ delegated = 1;
+ accessMode = NFS_OPEN_SHARE_ACCESS_BOTH;
+ if (nofp->nof_d_rw) {
+ denyMode = NFS_OPEN_SHARE_DENY_NONE;
+ } else if (nofp->nof_d_rw_dw) {
+ denyMode = NFS_OPEN_SHARE_DENY_WRITE;
+ } else if (nofp->nof_d_rw_drw) {
+ denyMode = NFS_OPEN_SHARE_DENY_BOTH;
+ }
+ } else if (nofp->nof_rw || nofp->nof_rw_dw || nofp->nof_rw_drw) {
+ delegated = 0;
+ accessMode = NFS_OPEN_SHARE_ACCESS_BOTH;
+ if (nofp->nof_rw) {