On Wed, Oct 11, 2017 at 03:11:21PM -0700, Dan Williams wrote: > > + /* > > + * We don't support synchronous mappings for non-DAX files. At least > > + * until someone comes with a sensible use case. > > + */ > > + if (!IS_DAX(file_inode(file)) && (map_flags & MAP_SYNC)) > > + return -EOPNOTSUPP; > > Perhaps EPERM instead to differentiate the unsupported flags case? > There's precedent for mmap returning EPERM for reasons other than > incompatible PROT flags. Why would we want to voluntarily use arcane errors for a entirely new interface under our control? -EOPNOTSUPP is nice and explicit about what is going on.