Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61530
b: refs/heads/master
c: 6967614
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh authored and Linus Torvalds committed Jul 19, 2007
1 parent 918482b commit 37c4b58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54cb8821de07f2ffcd28c380ce9b93d5784b40d7
refs/heads/master: 6967614761fd305b3414d9485d89dc2e0a407410
14 changes: 9 additions & 5 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2369,11 +2369,14 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
* address space wants to know that the page is about
* to become writable
*/
if (vma->vm_ops->page_mkwrite &&
vma->vm_ops->page_mkwrite(vma, page) < 0) {
fdata.type = VM_FAULT_SIGBUS;
anon = 1; /* no anon but release faulted_page */
goto out;
if (vma->vm_ops->page_mkwrite) {
unlock_page(page);
if (vma->vm_ops->page_mkwrite(vma, page) < 0) {
fdata.type = VM_FAULT_SIGBUS;
anon = 1; /* no anon but release faulted_page */
goto out_unlocked;
}
lock_page(page);
}
}

Expand Down Expand Up @@ -2425,6 +2428,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,

out:
unlock_page(faulted_page);
out_unlocked:
if (anon)
page_cache_release(faulted_page);
else if (dirty_page) {
Expand Down

0 comments on commit 37c4b58

Please sign in to comment.