The patch titled Subject: fs: ramfs: file-nommu: add SetPageUptodate() has been added to the -mm tree. Its filename is fs-ramfs-file-nommu-add-setpageuptodate.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Bob Liu <lliubbo@xxxxxxxxx> Subject: fs: ramfs: file-nommu: add SetPageUptodate() There is a bug in the below scenario for !CONFIG_MMU: 1. create a new file 2. mmap the file and write to it 3. read the file can't get the correct value Because sys_read() > generic_file_aio_read() > simple_readpage() > clear_page() which make the page be zeroed. Add SetPageUptodate() to ramfs_nommu_expand_for_mapping() so that generic_file_aio_read() do not call simple_readpage(). Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Greg Ungerer <gerg@xxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ramfs/file-nommu.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/ramfs/file-nommu.c~fs-ramfs-file-nommu-add-setpageuptodate fs/ramfs/file-nommu.c --- a/fs/ramfs/file-nommu.c~fs-ramfs-file-nommu-add-setpageuptodate +++ a/fs/ramfs/file-nommu.c @@ -110,6 +110,7 @@ int ramfs_nommu_expand_for_mapping(struc /* prevent the page from being discarded on memory pressure */ SetPageDirty(page); + SetPageUptodate(page); unlock_page(page); put_page(page); _ Subject: Subject: fs: ramfs: file-nommu: add SetPageUptodate() Patches currently in -mm which might be from lliubbo@xxxxxxxxx are fs-ramfs-file-nommu-add-setpageuptodate.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html