Skip to content

Commit 2840501

Browse files
committed
[GFS2] Use zero_user_page() in stuffed_readpage()
As suggested by Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Robert P. J. Day <rpjday@mindspring.com>
1 parent c420121 commit 2840501

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎fs/gfs2/ops_address.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
208208
* so we need to supply one here. It doesn't happen often.
209209
*/
210210
if (unlikely(page->index)) {
211-
kaddr = kmap_atomic(page, KM_USER0);
212-
memset(kaddr, 0, PAGE_CACHE_SIZE);
213-
kunmap_atomic(kaddr, KM_USER0);
214-
flush_dcache_page(page);
215-
SetPageUptodate(page);
211+
zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
216212
return 0;
217213
}
218214

0 commit comments

Comments
 (0)