From: OGAWA Hirofumi Date: Sun, 20 May 2007 14:39:40 +0000 (+0900) Subject: Fix "fs: convert core functions to zero_user_page" X-Git-Tag: v2.6.22-rc3~158 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff1be9ad61e3e17ba83702d8ed0b534e5b8ee15c;p=linux-2.6-omap-h63xx.git Fix "fs: convert core functions to zero_user_page" The bug was introduced by 01f2705daf5a36208e69d7cf95db9c330f843af6. It misses to convert the first argument, it should be "new_page". This became a cause of fatfs corruption. Cc: Nate Diller Signed-off-by: OGAWA Hirofumi Signed-off-by: Linus Torvalds --- diff --git a/fs/buffer.c b/fs/buffer.c index 49590d590d7..aa68206bd51 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2101,7 +2101,7 @@ int cont_prepare_write(struct page *page, unsigned offset, PAGE_CACHE_SIZE, get_block); if (status) goto out_unmap; - zero_user_page(page, zerofrom, PAGE_CACHE_SIZE - zerofrom, + zero_user_page(new_page, zerofrom, PAGE_CACHE_SIZE - zerofrom, KM_USER0); generic_commit_write(NULL, new_page, zerofrom, PAGE_CACHE_SIZE); unlock_page(new_page);