Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 086352f1 authored by Steven Whitehouse's avatar Steven Whitehouse
Browse files

GFS2: No need to invalidate pages for a dio read



We recently fixed the writeback of pages prior to performing
direct i/o, however the initial fix was perhaps a bit heavy
handed. There is no need to invalidate pages if the direct i/o
is only a read, since they will be identical to what has been
flushed to disk anyway.

Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 39849d69
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1032,7 +1032,8 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
			unmap_shared_mapping_range(ip->i_inode.i_mapping, offset, len);
		rv = filemap_write_and_wait_range(mapping, lstart, end);
		if (rv)
			return rv;
			goto out;
		if (rw == WRITE)
			truncate_inode_pages_range(mapping, lstart, end);
	}