From: Eric Date: Mon, 16 Jul 2007 16:23:19 +0000 (+0000) Subject: [CIFS] zero_user_page() conversions X-Git-Tag: v2.6.23-rc1~478^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fa20d4fb58cb342638bc14658083aadcad8fb74;p=linux-2.6 [CIFS] zero_user_page() conversions Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Steve French --- diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index cfa5b360d1..9ae901e544 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -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;