Skip to content

Commit

Permalink
Release page reference during page fault retry
Browse files Browse the repository at this point in the history
This slipped by when unifying the filemap and swap versions of
lock_page_or_retry()...

Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
walken-google authored and torvalds committed Nov 2, 2010
1 parent eb8abb9 commit d88c092
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,8 +1563,10 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
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)) {
Expand Down

0 comments on commit d88c092

Please sign in to comment.