From 057097fc00219fd46e52418177bb92f287d32cad Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 16 Jul 2007 15:45:13 +0000 Subject: [PATCH] --- yaml --- r: 61498 b: refs/heads/master c: 8803863a9051582081fb2bcca3a6dc8fddaed93c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/file.c | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 967befd67cef..8da90473e800 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a379e6657ae2dd910f9f06d46bd7c05fbe9ed5c +refs/heads/master: 8803863a9051582081fb2bcca3a6dc8fddaed93c diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index b67f1da020be..0620feaaea66 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -1966,14 +1966,7 @@ static int cifs_prepare_write(struct file *file, struct page *page, * We don't need to read data beyond the end of the file. * zero it, and set the page uptodate */ - void *kaddr = kmap_atomic(page, KM_USER0); - - if (from) - memset(kaddr, 0, from); - if (to < PAGE_CACHE_SIZE) - memset(kaddr + to, 0, PAGE_CACHE_SIZE - to); - flush_dcache_page(page); - kunmap_atomic(kaddr, KM_USER0); + simple_prepare_write(file, page, from, to); SetPageUptodate(page); } else if ((file->f_flags & O_ACCMODE) != O_WRONLY) { /* might as well read a page, it is fast enough */