Commit 919dc9e2 authored by Stephen Lord's avatar Stephen Lord Committed by Christoph Hellwig

XFS: Avoid writing data out to disk twice!

Modid: 2.5.x-xfs:slinx:128467a
parent b1eaf041
......@@ -223,7 +223,7 @@ probe_unmapped_page(
page = find_get_page(mapping, index);
if (!page)
return 0;
if (TestSetPageLocked(page)) {
if (PageWriteback(page) || TestSetPageLocked(page)) {
page_cache_release(page);
return 0;
}
......@@ -302,7 +302,7 @@ probe_page(
page = find_get_page(inode->i_mapping, index);
if (!page)
return NULL;
if (TestSetPageLocked(page)) {
if (PageWriteback(page) || TestSetPageLocked(page)) {
page_cache_release(page);
return NULL;
}
......@@ -331,6 +331,7 @@ submit_page(
BUG_ON(PageWriteback(page));
SetPageWriteback(page);
clear_page_dirty(page);
unlock_page(page);
if (cnt) {
......
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