summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-06-18 16:31:42 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2007-07-09 08:23:45 +0100
commit2840501ac822c5bf712f67b4b02640e16e145a29 (patch)
tree6fe4bed0d7d80d324c5d39f7528668adb123311b /fs
parentc4201214cbf10636e2c1ab9131573f735b42c8d4 (diff)
downloadlinux-2840501ac822c5bf712f67b4b02640e16e145a29.tar.bz2
[GFS2] Use zero_user_page() in stuffed_readpage()
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_address.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 9ab35a9ee75a..26c888890c24 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -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;
}