diff options
author | Nate Diller <nate.diller@gmail.com> | 2007-05-11 01:41:28 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-07-09 03:22:17 -0400 |
commit | 0507ecf50f22e433592f5ec3a36dc831aaec2e02 (patch) | |
tree | 3b4274268cdb359809ccc37b606d9dcff9e03c95 /fs/gfs2/bmap.c | |
parent | 6c53267f05dc6689ff662efeec426d25d2c0ab84 (diff) |
[GFS2] use zero_user_page
Use zero_user_page() instead of open-coding it.
Signed-off-by: Nate Diller <nate.diller@gmail.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index c53a5d2d0590..1c40c4bbf379 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -885,7 +885,6 @@ static int gfs2_block_truncate_page(struct address_space *mapping) | |||
885 | unsigned blocksize, iblock, length, pos; | 885 | unsigned blocksize, iblock, length, pos; |
886 | struct buffer_head *bh; | 886 | struct buffer_head *bh; |
887 | struct page *page; | 887 | struct page *page; |
888 | void *kaddr; | ||
889 | int err; | 888 | int err; |
890 | 889 | ||
891 | page = grab_cache_page(mapping, index); | 890 | page = grab_cache_page(mapping, index); |
@@ -933,10 +932,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping) | |||
933 | if (sdp->sd_args.ar_data == GFS2_DATA_ORDERED || gfs2_is_jdata(ip)) | 932 | if (sdp->sd_args.ar_data == GFS2_DATA_ORDERED || gfs2_is_jdata(ip)) |
934 | gfs2_trans_add_bh(ip->i_gl, bh, 0); | 933 | gfs2_trans_add_bh(ip->i_gl, bh, 0); |
935 | 934 | ||
936 | kaddr = kmap_atomic(page, KM_USER0); | 935 | zero_user_page(page, offset, length, KM_USER0); |
937 | memset(kaddr + offset, 0, length); | ||
938 | flush_dcache_page(page); | ||
939 | kunmap_atomic(kaddr, KM_USER0); | ||
940 | 936 | ||
941 | unlock: | 937 | unlock: |
942 | unlock_page(page); | 938 | unlock_page(page); |