[GFS2] Use zero_user_page() in stuffed_readpage()
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 18 Jun 2007 15:31:42 +0000 (16:31 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 9 Jul 2007 07:23:45 +0000 (08:23 +0100)
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>
fs/gfs2/ops_address.c

index 9ab35a9ee75ac3abf3a9d293d49efd1ee7f33a39..26c888890c245bf562931a2ddd54619ac582d36c 100644 (file)
@@ -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;
        }