I'd rather just change the rule that "writepage()" will clear the dirty
bit itself and always unlock (and "1" just to inform the upper layers that
the page cannot be thrown away).
> 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) ;
Can't be done. The thing depends on the fact that it always depletes the
dirty list. The whole fdatasync() logic hinges on the fact that it will
always move pages "down" - otherwise it will never complete.
Linus
-
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/