On Mon, May 14, 2018 at 05:36:22PM +0200, Andreas Gruenbacher wrote: > With that, the direct_IO address space operation can be all but > eliminated: only a dummy remains which indicates that the filesystem > supports direct I/O. And that dummy can be replaced with the generic noop_direct_IO helper. > + ret = filemap_write_and_wait_range(mapping, lstart, end); > + if (ret) > + goto out; We already do this call in the common code. > + if (iov_iter_rw(from) == WRITE) > + truncate_inode_pages_range(mapping, lstart, end); Why do you need the truncate_inode_pages_range call here instead of invalidate_inode_pages2_range that everyone else uses and that the iomap code already does for you?