]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ocfs2: use zero_user_page
authorNate Diller <nate.diller@gmail.com>
Fri, 11 May 2007 05:56:01 +0000 (22:56 -0700)
committerMark Fasheh <mark.fasheh@oracle.com>
Fri, 25 May 2007 18:00:39 +0000 (11:00 -0700)
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>
fs/ocfs2/aops.c

index 30306707b2caee141f39b69fb7decaf7d37f3045..0023b31e48a896502fa18ff11764e82def0e9ba3 100644 (file)
@@ -238,10 +238,7 @@ static int ocfs2_readpage(struct file *file, struct page *page)
         * XXX sys_readahead() seems to get that wrong?
         */
        if (start >= i_size_read(inode)) {
-               char *addr = kmap(page);
-               memset(addr, 0, PAGE_SIZE);
-               flush_dcache_page(page);
-               kunmap(page);
+               zero_user_page(page, 0, PAGE_SIZE, KM_USER0);
                SetPageUptodate(page);
                ret = 0;
                goto out_alloc;