ext3 set_page_dirty fix
PATCH 3/18 ext3 set_page_dirty fix
The set_page_dirty() in the ext3_writepage() failure path isn't right. set_page_dirty() will alter buffer states - it's a "whole page" dirtying.
__set_page_dirty_buffers() is emitting warnings when it refuses to set dirty a non-uptodate buffer against a partially-mapped page.
All we want to do in there is to move the page back onto mapping->dirty_pages, without altering the state of its buffers.
=====================================
fs/ext3/inode.c renamed from fs/ext3/inode.c~ext3-set_page_dirty +7 -1
@@ -1327,7 +1327,13 @@ static int ext3_writepage(struct page *p out_fail:unlock_kernel (); -set_page_dirty (page); + +/* +* We have to fail this writepage to avoid cross-fs transactions. +* Put the page back on mapping->dirty_pages, but leave its buffer's +* dirty state as-is. +*/ +__set_page_dirty_nobuffers (page);unlock_page (page);return ret; }
-