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

Commit 5c3c6bb7 authored by Nate Diller's avatar Nate Diller Committed by Mark Fasheh
Browse files

[PATCH] ocfs2: use zero_user_page



Use zero_user_page() instead of open-coding it.

Signed-off-by: default avatarNate Diller <nate.diller@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
parent 1024c902
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -238,10 +238,7 @@ static int ocfs2_readpage(struct file *file, struct page *page)
	 * XXX sys_readahead() seems to get that wrong?
	 * XXX sys_readahead() seems to get that wrong?
	 */
	 */
	if (start >= i_size_read(inode)) {
	if (start >= i_size_read(inode)) {
		char *addr = kmap(page);
		zero_user_page(page, 0, PAGE_SIZE, KM_USER0);
		memset(addr, 0, PAGE_SIZE);
		flush_dcache_page(page);
		kunmap(page);
		SetPageUptodate(page);
		SetPageUptodate(page);
		ret = 0;
		ret = 0;
		goto out_alloc;
		goto out_alloc;