aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorNate Diller <nate.diller@gmail.com>2007-05-11 01:56:01 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2007-05-25 14:00:39 -0400
commit5c3c6bb7709bf2bf4132750124879b3d89183e46 (patch)
tree267dc760d0dbb747989d17759fa5e49479da24c2 /fs/ocfs2
parent1024c902abdcbd2425aa850d7ef04e013ffb35f0 (diff)
[PATCH] ocfs2: use zero_user_page
Use zero_user_page() instead of open-coding it. Signed-off-by: Nate Diller <nate.diller@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/aops.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 30306707b2ca..0023b31e48a8 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -238,10 +238,7 @@ static int ocfs2_readpage(struct file *file, struct page *page)
238 * XXX sys_readahead() seems to get that wrong? 238 * XXX sys_readahead() seems to get that wrong?
239 */ 239 */
240 if (start >= i_size_read(inode)) { 240 if (start >= i_size_read(inode)) {
241 char *addr = kmap(page); 241 zero_user_page(page, 0, PAGE_SIZE, KM_USER0);
242 memset(addr, 0, PAGE_SIZE);
243 flush_dcache_page(page);
244 kunmap(page);
245 SetPageUptodate(page); 242 SetPageUptodate(page);
246 ret = 0; 243 ret = 0;
247 goto out_alloc; 244 goto out_alloc;