diff options
author | Nate Diller <nate.diller@gmail.com> | 2007-05-09 02:35:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 12:30:55 -0700 |
commit | f36dca90e674a1a62cad810f630629c0008b2128 (patch) | |
tree | 56c7d0570d63de5af08dfa64859689904d91432d /fs/affs | |
parent | 01f2705daf5a36208e69d7cf95db9c330f843af6 (diff) | |
download | op-kernel-dev-f36dca90e674a1a62cad810f630629c0008b2128.zip op-kernel-dev-f36dca90e674a1a62cad810f630629c0008b2128.tar.gz |
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')
-rw-r--r-- | fs/affs/file.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c index 4aa8079..c879690 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 return err; } if (to < PAGE_CACHE_SIZE) { - char *kaddr = kmap_atomic(page, KM_USER0); - - memset(kaddr + to, 0, PAGE_CACHE_SIZE - to); - flush_dcache_page(page); - kunmap_atomic(kaddr, KM_USER0); + zero_user_page(page, to, PAGE_CACHE_SIZE - to, KM_USER0); if (size > offset + to) { if (size < offset + PAGE_CACHE_SIZE) tmp = size & ~PAGE_CACHE_MASK; |