Potential fix to filemap_fault()
From: Steven Whitehouse
Date: Thu Jul 31 2008 - 07:05:59 EST
Hi,
We've spotted (with our cluster coherency tests) a couple of issues in
the current page fault path. One of those is fixed by the below patch,
so I'd like to know if anybody can spot any unwanted side effects if we
make this change. The patch prevents us from seeing bus errors when
accessing what should be valid data within a file. This can currently
happen when there is a race between invalidation and the page fault
path.
After applying this patch, we still see one remaining issue, which I
think is related to page_mkwrite but we've not finally tracked that one
down yet. The symptoms of the remaining issue are that we see a blank
page from time to time, when we should be seeing valid data.
Steve.
diff --git a/mm/filemap.c b/mm/filemap.c
index 42bbc69..9441759 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1563,7 +1563,7 @@ page_not_uptodate:
error = mapping->a_ops->readpage(file, page);
if (!error) {
wait_on_page_locked(page);
- if (!PageUptodate(page))
+ if (PageError(page))
error = -EIO;
}
page_cache_release(page);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/