diff options
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/swapfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 6cc6dfb4d27b..62e0da8f7e6e 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
| @@ -215,8 +215,6 @@ static struct swap_info_struct * swap_info_get(swp_entry_t entry) | |||
| 215 | if (!p->swap_map[offset]) | 215 | if (!p->swap_map[offset]) |
| 216 | goto bad_free; | 216 | goto bad_free; |
| 217 | swap_list_lock(); | 217 | swap_list_lock(); |
| 218 | if (p->prio > swap_info[swap_list.next].prio) | ||
| 219 | swap_list.next = type; | ||
| 220 | swap_device_lock(p); | 218 | swap_device_lock(p); |
| 221 | return p; | 219 | return p; |
| 222 | 220 | ||
| @@ -253,6 +251,8 @@ static int swap_entry_free(struct swap_info_struct *p, unsigned long offset) | |||
| 253 | p->lowest_bit = offset; | 251 | p->lowest_bit = offset; |
| 254 | if (offset > p->highest_bit) | 252 | if (offset > p->highest_bit) |
| 255 | p->highest_bit = offset; | 253 | p->highest_bit = offset; |
| 254 | if (p->prio > swap_info[swap_list.next].prio) | ||
| 255 | swap_list.next = p - swap_info; | ||
| 256 | nr_swap_pages++; | 256 | nr_swap_pages++; |
| 257 | p->inuse_pages--; | 257 | p->inuse_pages--; |
| 258 | } | 258 | } |
