[PATCH] vfs: reduce page fault retry code

From: Wu Fengguang
Date: Fri Apr 03 2009 - 04:55:31 EST


find_lock_page_retry() works the same way as find_lock_page()
when retry_flag=0. And their return value handling shall work
(almost) in the same way, or it will already be a bug.

So the !retry_flag special casing can be eliminated.

Cc: Ying Han <yinghan@xxxxxxxxxx>
Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
mm/filemap.c | 7 -------
1 file changed, 7 deletions(-)

--- mm.orig/mm/filemap.c
+++ mm/mm/filemap.c
@@ -1663,13 +1663,6 @@ no_cached_page:
* meantime, we'll just come back here and read it again.
*/
if (error >= 0) {
- /*
- * If caller cannot tolerate a retry in the ->fault path
- * go back to check the page again.
- */
- if (!retry_flag)
- goto retry_find;
-
retry_ret = find_lock_page_retry(mapping, vmf->pgoff,
vma, &page, retry_flag);
if (retry_ret == VM_FAULT_RETRY)
--
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/