aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs/file.c
diff options
context:
space:
mode:
authorNate Diller <nate.diller@gmail.com>2007-05-09 05:35:07 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:55 -0400
commitf36dca90e674a1a62cad810f630629c0008b2128 (patch)
tree56c7d0570d63de5af08dfa64859689904d91432d /fs/affs/file.c
parent01f2705daf5a36208e69d7cf95db9c330f843af6 (diff)
affs: use zero_user_page
Use zero_user_page() instead of open-coding it. Signed-off-by: Nate Diller <nate.diller@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/affs/file.c')
-rw-r--r--fs/affs/file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c
index 4aa8079e71be..c8796906f584 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -628,11 +628,7 @@ static int affs_prepare_write_ofs(struct file *file, struct page *page, unsigned
628 return err; 628 return err;
629 } 629 }
630 if (to < PAGE_CACHE_SIZE) { 630 if (to < PAGE_CACHE_SIZE) {
631 char *kaddr = kmap_atomic(page, KM_USER0); 631 zero_user_page(page, to, PAGE_CACHE_SIZE - to, KM_USER0);
632
633 memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
634 flush_dcache_page(page);
635 kunmap_atomic(kaddr, KM_USER0);
636 if (size > offset + to) { 632 if (size > offset + to) {
637 if (size < offset + PAGE_CACHE_SIZE) 633 if (size < offset + PAGE_CACHE_SIZE)
638 tmp = size & ~PAGE_CACHE_MASK; 634 tmp = size & ~PAGE_CACHE_MASK;