From fa46775b443b1b9933f97eb73e277e258b305035 Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Sat, 3 Sep 2005 15:54:36 -0700 Subject: [PATCH] --- yaml --- r: 6850 b: refs/heads/master c: 89d09a2c80ea6baafb559b86d545fada05e14ab5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/swapfile.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a7fbea6f5b80..ea5710f1ac62 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6eb396dc4a9781c5e7951143ab56ce5710687ab3 +refs/heads/master: 89d09a2c80ea6baafb559b86d545fada05e14ab5 diff --git a/trunk/mm/swapfile.c b/trunk/mm/swapfile.c index 6cc6dfb4d27b..62e0da8f7e6e 100644 --- a/trunk/mm/swapfile.c +++ b/trunk/mm/swapfile.c @@ -215,8 +215,6 @@ static struct swap_info_struct * swap_info_get(swp_entry_t entry) if (!p->swap_map[offset]) goto bad_free; swap_list_lock(); - if (p->prio > swap_info[swap_list.next].prio) - swap_list.next = type; swap_device_lock(p); return p; @@ -253,6 +251,8 @@ static int swap_entry_free(struct swap_info_struct *p, unsigned long offset) p->lowest_bit = offset; if (offset > p->highest_bit) p->highest_bit = offset; + if (p->prio > swap_info[swap_list.next].prio) + swap_list.next = p - swap_info; nr_swap_pages++; p->inuse_pages--; }