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

Commit f95cbb44 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

gfs2: use iomap_readpage for blocksize == PAGE_SIZE



We only use iomap_readpage for pages that don't have buffer heads
attached yet: iomap_readpage would otherwise read pages from disk that
are marked buffer_uptodate() but not PageUptodate().  Those pages may
actually contain data more recent than what's on disk.

Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: default avatarBob Peterson <rpeterso@redhat.com>
parent 1d45bb7f
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -508,9 +508,13 @@ static int __gfs2_readpage(void *file, struct page *page)
{
{
	struct gfs2_inode *ip = GFS2_I(page->mapping->host);
	struct gfs2_inode *ip = GFS2_I(page->mapping->host);
	struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);
	struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);

	int error;
	int error;


	if (gfs2_is_stuffed(ip)) {
	if (i_blocksize(page->mapping->host) == PAGE_SIZE &&
	    !page_has_buffers(page)) {
		error = iomap_readpage(page, &gfs2_iomap_ops);
	} else if (gfs2_is_stuffed(ip)) {
		error = stuffed_readpage(ip, page);
		error = stuffed_readpage(ip, page);
		unlock_page(page);
		unlock_page(page);
	} else {
	} else {