[lkml]   [2009]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 24/24] GFS2: Fix cache coherency between truncate and O_DIRECT read
    If a page was partially zeroed as the result of a truncate, then it was
    not being correctly marked dirty. This resulted in the deleted data
    reappearing if the file was read back via direct I/O.

    Reported-by: Eric Sandeen <>
    Signed-off-by: Steven Whitehouse <>

    diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
    index 1153a07..3297635 100644
    --- a/fs/gfs2/bmap.c
    +++ b/fs/gfs2/bmap.c
    @@ -1012,7 +1012,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping)
    gfs2_trans_add_bh(ip->i_gl, bh, 0);

    zero_user(page, offset, length);
    + mark_buffer_dirty(bh);

     \ /
      Last update: 2009-06-10 11:51    [W:0.020 / U:132.416 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site