Commit 0e2a24af authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Chandan Babu R
Browse files

xfs: don't try to handle non-update pages in xfile_obj_load



shmem_read_mapping_page_gfp always returns an uptodate page or an
ERR_PTR.  Remove the code that tries to handle a non-uptodate page.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent e47e2e0b
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -149,7 +149,6 @@ xfile_load(
			goto advance;
		}

		if (PageUptodate(page)) {
		/*
		 * xfile pages must never be mapped into userspace, so
		 * we skip the dcache flush.
@@ -158,9 +157,6 @@ xfile_load(
		p = kaddr + offset_in_page(pos);
		memcpy(buf, p, len);
		kunmap_local(kaddr);
		} else {
			memset(buf, 0, len);
		}
		put_page(page);

advance: