Skip to contentSkip to conversation

Fix "fs: convert core functions to zero_user_page"

PATCH New OGAWA Hirofumi 1 participant 1 message May 20, 2007 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix "fs: convert core functions to zero_user_page"

The bug introduced by 01f2705daf5a36208e69d7cf95db9c330f843af6. It misses to convert the first argument, it should be "new_page".

This became the cause of fatfs corruption.

---

 fs/buffer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/buffer.c renamed from fs/buffer.c~fix-zero_user_page-conversion +1 -1
diff -puN fs/buffer.c~fix-zero_user_page-conversion fs/buffer.c
@@ -2109,7 +2109,7 @@ int cont_prepare_write(struct page *page
 						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);

_

Signature · 1 line
OGAWA Hirofumi <[email protected]>