Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1167
b: refs/heads/master
c: b810748
h: refs/heads/master
i:
  1165: da0bf6e
  1163: 9e517c2
  1159: 1d2cf0c
  1151: 26252ed
v: v3
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed May 17, 2005
1 parent f41e867 commit 997c7b8
Show file tree
Hide file tree
Showing 2 changed files with 13 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: c64610ba585fabb36be78782868277f3d9741a2e
refs/heads/master: b81074800b98ac50b64d4c8d34e8abf0fda5e3d1
17 changes: 12 additions & 5 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1701,12 +1701,13 @@ static int do_swap_page(struct mm_struct * mm,
spin_lock(&mm->page_table_lock);
page_table = pte_offset_map(pmd, address);
if (unlikely(!pte_same(*page_table, orig_pte))) {
pte_unmap(page_table);
spin_unlock(&mm->page_table_lock);
unlock_page(page);
page_cache_release(page);
ret = VM_FAULT_MINOR;
goto out;
goto out_nomap;
}

if (unlikely(!PageUptodate(page))) {
ret = VM_FAULT_SIGBUS;
goto out_nomap;
}

/* The page isn't present yet, go ahead with the fault. */
Expand Down Expand Up @@ -1741,6 +1742,12 @@ static int do_swap_page(struct mm_struct * mm,
spin_unlock(&mm->page_table_lock);
out:
return ret;
out_nomap:
pte_unmap(page_table);
spin_unlock(&mm->page_table_lock);
unlock_page(page);
page_cache_release(page);
goto out;
}

/*
Expand Down

0 comments on commit 997c7b8

Please sign in to comment.