lkml.org 
[lkml]   [2007]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 9/13] ocfs2: use zero_user_page
    Use zero_user_page() instead of open-coding it. 

    Signed-off-by: Nate Diller <nate.diller@gmail.com>

    ---

    diff -urpN -X dontdiff linux-2.6.21-rc6-mm1/fs/ocfs2/aops.c linux-2.6.21-rc6-mm1-test/fs/ocfs2/aops.c
    --- linux-2.6.21-rc6-mm1/fs/ocfs2/aops.c 2007-04-09 17:24:03.000000000 -0700
    +++ linux-2.6.21-rc6-mm1-test/fs/ocfs2/aops.c 2007-04-09 18:18:23.000000000 -0700
    @@ -234,10 +234,7 @@ static int ocfs2_readpage(struct file *f
    * 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);
    SetPageUptodate(page);
    ret = 0;
    goto out_alloc;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-04-11 05:43    [W:0.019 / U:180.600 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site