Re: [PATCH] mm: fix page_mkclean_one
From: Guillaume Chazarain
Date: Thu Dec 28 2006 - 14:20:04 EST
Guillaume Chazarain a écrit :
I get this kind of corruption:
http://guichaz.free.fr/linux-bug/corruption.png
Actually in qemu, I get three different behaviours:
- no corruption at all : with linux-2.4
- corruption only on the first chunks: before [PATCH] mm: balance dirty
pages as identified by Kenneth
- corruption of all chunks: after the balance dirty pages patch
Bisecting in linux-2.5 land I found
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.66/2.5.66-mm3/broken-out/fadvise-flush-data.patch
to cause the corruption for me.
The attached patch fixes the corruption for me.
--
Guillaume
diff -r 3859b1144d3a mm/fadvise.c
--- a/mm/fadvise.c Sun Dec 24 05:00:03 2006 +0000
+++ b/mm/fadvise.c Thu Dec 28 19:53:40 2006 +0100
@@ -96,9 +96,6 @@ asmlinkage long sys_fadvise64_64(int fd,
case POSIX_FADV_NOREUSE:
break;
case POSIX_FADV_DONTNEED:
- if (!bdi_write_congested(mapping->backing_dev_info))
- filemap_flush(mapping);
-
/* First and last FULL page! */
start_index = (offset+(PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT;
end_index = (endbyte >> PAGE_CACHE_SHIFT);