aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-06-10 04:09:40 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2009-06-10 04:09:40 -0400
commit40bc9a27e00d6c8c7e4dc2865c02d7402a950472 (patch)
tree0a445d4c8b22833898a5363f750744146cb05aff /fs/gfs2
parentf6d03139d745198b434f65a28aabed524f415a4c (diff)
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 <sandeen@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/bmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 1153a078920c..329763530dc0 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)
1012 gfs2_trans_add_bh(ip->i_gl, bh, 0); 1012 gfs2_trans_add_bh(ip->i_gl, bh, 0);
1013 1013
1014 zero_user(page, offset, length); 1014 zero_user(page, offset, length);
1015 1015 mark_buffer_dirty(bh);
1016unlock: 1016unlock:
1017 unlock_page(page); 1017 unlock_page(page);
1018 page_cache_release(page); 1018 page_cache_release(page);