Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f36dca90e674a1a62cad810f630629c0008b2128
Commit:     f36dca90e674a1a62cad810f630629c0008b2128
Parent:     01f2705daf5a36208e69d7cf95db9c330f843af6
Author:     Nate Diller <[EMAIL PROTECTED]>
AuthorDate: Wed May 9 02:35:07 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 9 12:30:55 2007 -0700

    affs: use zero_user_page
    
    Use zero_user_page() instead of open-coding it.
    
    Signed-off-by: Nate Diller <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to