aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/slob.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slob.c b/mm/slob.c
index 5bc2ceb692ec..08a9bd91a1aa 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -321,7 +321,8 @@ static void *slob_alloc(size_t size, gfp_t gfp, int align, int node)
321 /* Improve fragment distribution and reduce our average 321 /* Improve fragment distribution and reduce our average
322 * search time by starting our next search here. (see 322 * search time by starting our next search here. (see
323 * Knuth vol 1, sec 2.5, pg 449) */ 323 * Knuth vol 1, sec 2.5, pg 449) */
324 if (free_slob_pages.next != prev->next) 324 if (prev != free_slob_pages.prev &&
325 free_slob_pages.next != prev->next)
325 list_move_tail(&free_slob_pages, prev->next); 326 list_move_tail(&free_slob_pages, prev->next);
326 break; 327 break;
327 } 328 }