Commit 12feeeda authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] 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.
parent 9ff5178d
......@@ -1327,7 +1327,13 @@ static int ext3_writepage(struct page *page)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment