]> err.no Git - linux-2.6/commitdiff
[CIFS] zero_user_page() conversions
authorEric <sandeen@redhat.com>
Mon, 16 Jul 2007 16:23:19 +0000 (16:23 +0000)
committerSteve French <sfrench@us.ibm.com>
Mon, 16 Jul 2007 16:23:19 +0000 (16:23 +0000)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c

index cfa5b360d12e6f56b6d4f53a5facb5cd8ecb550b..9ae901e54412ab818f87dc05ff76a971682d8a9d 100644 (file)
@@ -1353,10 +1353,7 @@ static int cifs_truncate_page(struct address_space *mapping, loff_t from)
        if (!page)
                return -ENOMEM;
 
-       kaddr = kmap_atomic(page, KM_USER0);
-       memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset);
-       flush_dcache_page(page);
-       kunmap_atomic(kaddr, KM_USER0);
+       zero_user_page(page, offset, PAGE_CACHE_SIZE - offset), KM_USER0);
        unlock_page(page);
        page_cache_release(page);
        return rc;