Commit 6d01cc49 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] write_one_page() fixlets

- set the number of pages to be written to "1".

- Don't test PG_writeback twice.
parent 87852ab0
......@@ -430,11 +430,12 @@ int write_one_page(struct page *page, int wait)
int ret = 0;
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
.nr_to_write = 1,
};
BUG_ON(!PageLocked(page));
if (wait && PageWriteback(page))
if (wait)
wait_on_page_writeback(page);
spin_lock(&mapping->page_lock);
......
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