X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=kernel-bfs-2.6.28%2Fdebian%2Fpatches%2Fpatch_swap_notify_core_support_2.6.28.diff;h=d681471a4f96eeec4d0906190a64793cbb705a1d;hb=4c706ebf98c75b2a2106ad3a6e1dc8eba98136d4;hp=2a66eb139f9986e276dc3fb982b0ffaa35a2790e;hpb=d73dbd41b47af50f7652082b5b8a4594836d6ed9;p=kernel-bfs diff --git a/kernel-bfs-2.6.28/debian/patches/patch_swap_notify_core_support_2.6.28.diff b/kernel-bfs-2.6.28/debian/patches/patch_swap_notify_core_support_2.6.28.diff index 2a66eb1..d681471 100644 --- a/kernel-bfs-2.6.28/debian/patches/patch_swap_notify_core_support_2.6.28.diff +++ b/kernel-bfs-2.6.28/debian/patches/patch_swap_notify_core_support_2.6.28.diff @@ -61,7 +61,7 @@ diff -uprN linux-2.6.28/mm/swapfile.c linux-2.6.28.new/mm/swapfile.c if (count >= SWAP_MAP_MAX) return count; -@@ -283,28 +296,40 @@ static int swap_entry_free(struct swap_i +@@ -283,28 +295,39 @@ static int swap_entry_free(struct swap_i if (count) return count; @@ -76,16 +76,15 @@ diff -uprN linux-2.6.28/mm/swapfile.c linux-2.6.28.new/mm/swapfile.c - swap_list.next = p - swap_info; - nr_swap_pages++; - p->inuse_pages--; -+ if (p->swap_remap) { -+ spin_lock(&p->remap_lock); -+ swap_entry_update(p, offset); -+ } -+ else { ++ if (!p->swap_remap) { + swap_entry_update(p, offset); + if (disk->fops->swap_slot_free_notify) + disk->fops->swap_slot_free_notify(p->bdev, offset); + return 0; + } ++ ++ spin_lock(&p->remap_lock); ++ swap_entry_update(p, offset); /* Re-map the page number */ old = p->swap_remap[offset] & 0x7FFFFFFF;