Commit 2840501a authored by Steven Whitehouse's avatar Steven Whitehouse

[GFS2] Use zero_user_page() in stuffed_readpage()

As suggested by Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
Cc: Robert P. J. Day <rpjday@mindspring.com>
parent c4201214
......@@ -208,11 +208,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
* so we need to supply one here. It doesn't happen often.
*/
if (unlikely(page->index)) {
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr, 0, PAGE_CACHE_SIZE);
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(page);
SetPageUptodate(page);
zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment