Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232731
b: refs/heads/master
c: af241a0
h: refs/heads/master
i:
  232729: d3f5b9e
  232727: efb6813
v: v3
  • Loading branch information
Jin Dongming authored and Linus Torvalds committed Feb 3, 2011
1 parent a74cd20 commit 4a77ccf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 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: a6d30dddae4648837be5a0c0cb2c0ae9ad0377db
refs/heads/master: af241a083404acda7ba3690e5b7697949d729fcc
31 changes: 17 additions & 14 deletions trunk/mm/memory-failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ void shake_page(struct page *p, int access)
}

/*
* Only all shrink_slab here (which would also
* shrink other caches) if access is not potentially fatal.
* Only call shrink_slab here (which would also shrink other caches) if
* access is not potentially fatal.
*/
if (access) {
int nr;
Expand Down Expand Up @@ -1065,19 +1065,22 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
* The check (unnecessarily) ignores LRU pages being isolated and
* walked by the page reclaim code, however that's not a big loss.
*/
if (!PageLRU(p) && !PageHuge(p))
shake_page(p, 0);
if (!PageLRU(p) && !PageHuge(p)) {
/*
* shake_page could have turned it free.
*/
if (is_free_buddy_page(p)) {
action_result(pfn, "free buddy, 2nd try", DELAYED);
return 0;
if (!PageHuge(p) && !PageTransCompound(p)) {
if (!PageLRU(p))
shake_page(p, 0);
if (!PageLRU(p)) {
/*
* shake_page could have turned it free.
*/
if (is_free_buddy_page(p)) {
action_result(pfn, "free buddy, 2nd try",
DELAYED);
return 0;
}
action_result(pfn, "non LRU", IGNORED);
put_page(p);
return -EBUSY;
}
action_result(pfn, "non LRU", IGNORED);
put_page(p);
return -EBUSY;
}

/*
Expand Down

0 comments on commit 4a77ccf

Please sign in to comment.