Re: [PATCH 2/3] Retry page fault when blocking on disk transfer.
From: Michel Lespinasse
Date: Tue Nov 02 2010 - 16:05:44 EST
On Fri, Oct 08, 2010 at 06:22:04PM -0700, Michel Lespinasse wrote:
> Second try on adding the VM_FAULT_RETRY functionality to the swap in path.
>
> This proposal would replace [patch 2/3] of this series (the initial
> version of it, which was approved by linus / rik / hpa).
Oh my. I've been evidently sloppy while merging the filemap and swap
versions of lock_page_or_retry(), and this issue slipped in...
Please apply attached change. Sorry for not catching this earlier :(
----------------------------- 8< --------------------------------
Release page reference during page fault retry
This slipped by when unifying the filemap and swap versions of
lock_page_or_retry()...
Signed-off-by: Michel Lespinasse <walken@xxxxxxxxxx>
diff --git a/mm/filemap.c b/mm/filemap.c
index 33f8125..c479d9c 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1563,8 +1563,10 @@ retry_find:
goto no_cached_page;
}
- if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags))
+ if (!lock_page_or_retry(page, vma->vm_mm, vmf->flags)) {
+ page_cache_release(page);
return ret | VM_FAULT_RETRY;
+ }
/* Did it get truncated? */
if (unlikely(page->mapping != mapping)) {
--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
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/