Fix "fs: convert core functions to zero_user_page"
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Sun, 20 May 2007 14:39:40 +0000 (23:39 +0900)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 21 May 2007 16:15:32 +0000 (09:15 -0700)
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 <nate.diller@gmail.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/buffer.c

index 49590d5..aa68206 100644 (file)
@@ -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);