Re: [BUG]: kernel BUG at mm/swapfile.c:806! (2.6)

From: Hugh Dickins
Date: Fri Feb 06 2004 - 16:39:44 EST


This should fix your swapfile.c:806.
Looks like mail.ru XFS users get more jumbled block allocations.
I've other fixes and tidyups hereabouts, but they can wait.

Hugh

--- 2.6.2/mm/swapfile.c 2004-02-04 02:45:17.000000000 +0000
+++ linux/mm/swapfile.c 2004-02-06 21:21:08.011274104 +0000
@@ -841,7 +841,8 @@
lh = sis->extent_list.next; /* The highest-addressed block */
while (lh != &sis->extent_list) {
se = list_entry(lh, struct swap_extent, list);
- if (se->start_block + se->nr_pages == start_block) {
+ if (se->start_block + se->nr_pages == start_block &&
+ se->start_page + se->nr_pages == start_page) {
/* Merge it */
se->nr_pages += nr_pages;
return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/