On 15 May 2018 at 09:31, Christoph Hellwig <hch@xxxxxx> wrote: > 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. Ok, switching to that. >> + 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? Indeed, I guess this whole code block can now be discarded. Taking Steve into the CC since it's him who originally added that. Thanks, Andreas