The page dirty bit is not reset.
the page is never unlocked.
So how about something like this in filemap_fdatasync
ret = writepage(page) ;
if (ret == 1) {
/* writepage declined to write it out,
** leave it on the locked list, but make
** sure the dirty bit stays on so the page
** doesn't disappear
*/
SetPageDirty(page) ;
UnlockPage(page) ;
}
And then, in filemap_fdatawait:
list_del(&page->list) ;
if (PageDirty(page))
list_add(&page->list, &mapping->dirty_pages) ;
else
list_add(&page->list, &mapping->clean_pages) ;
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/