- * Ensure that file protection and desired protection
- * are compatible. Note that we only worry about writability
- * if mapping is shared.
- */
- if ((uap->prot & PROT_READ) && (fp->f_flag & FREAD) == 0 ||
- ((flags & MAP_SHARED) &&
- (uap->prot & PROT_WRITE) && (fp->f_flag & FWRITE) == 0))
- return(EACCES);
- handle = (caddr_t)vp;
- /*
- * PATCH GVR 25-03-93
- * Map protections to MACH style
+ * Set maxprot according to file protection.
+ * If the file is the backing store, enable maxprot write
+ * if the file protection allows. If the file isn't
+ * the backing store, enable writes.