The patch titled
swap: freeing update swap_list.next
has been added to the -mm tree. Its filename is
swap-freeing-update-swap_listnext.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
swap-update-swapfile-i_sem-comment.patch
swap-correct-swapfile-nr_good_pages.patch
swap-move-destroy_swap_extents-calls.patch
swap-swap-extent-list-is-ordered.patch
swap-show-span-of-swap-extents.patch
swap-swap-unsigned-int-consistency.patch
swap-freeing-update-swap_listnext.patch
swap-get_swap_page-drop-swap_list_lock.patch
swap-scan_swap_map-restyled.patch
swap-scan_swap_map-drop-swap_device_lock.patch
swap-scan_swap_map-latency-breaks.patch
swap-swap_lock-replace-listdevice.patch
swap-update-swsusp-use-of-swap_info.patch
From: Hugh Dickins <[EMAIL PROTECTED]>
This makes negligible difference in practice: but swap_list.next should not be
updated to a higher prio in the general helper swap_info_get, but rather in
swap_entry_free; and then only in the case when entry is actually freed.
Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
mm/swapfile.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -puN mm/swapfile.c~swap-freeing-update-swap_listnext mm/swapfile.c
--- devel/mm/swapfile.c~swap-freeing-update-swap_listnext 2005-07-08
22:34:50.000000000 -0700
+++ devel-akpm/mm/swapfile.c 2005-07-08 22:34:50.000000000 -0700
@@ -215,8 +215,6 @@ static struct swap_info_struct * swap_in
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_i
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--;
}
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html