initial check-in of kp49 work (up to commit date)
[kernel-bfs] / kernel-bfs-2.6.28 / debian / patches / patch_swap_notify_core_support_2_2.6.28.diff
diff --git a/kernel-bfs-2.6.28/debian/patches/patch_swap_notify_core_support_2_2.6.28.diff b/kernel-bfs-2.6.28/debian/patches/patch_swap_notify_core_support_2_2.6.28.diff
new file mode 100644 (file)
index 0000000..46c7f7e
--- /dev/null
@@ -0,0 +1,43 @@
+---
+ mm/swapfile.c |    7 +++----
+ 1 files changed, 3 insertions(+), 4 deletions(-)
+
+Index: kernel-power-2.6.28/mm/swapfile.c
+===================================================================
+--- kernel-power-2.6.28.orig/mm/swapfile.c
++++ kernel-power-2.6.28/mm/swapfile.c
+@@ -285,7 +285,7 @@
+ static int swap_entry_free(struct swap_info_struct *p, unsigned long offset)
+ {
+       int count = p->swap_map[offset];
+-      unsigned old;
++      unsigned long old;
+       struct gendisk *disk;
+       if (count >= SWAP_MAP_MAX)
+@@ -305,7 +305,7 @@
+       else {
+               swap_entry_update(p, offset);
+               if (disk->fops->swap_slot_free_notify)
+-                      disk->fops->swap_slot_free_notify(p->bdev, offset);
++                      disk->fops->swap_slot_free_notify(p->bdev, offset*(PAGE_SIZE >> 9));
+               return 0;
+       }
+@@ -317,7 +317,6 @@
+               if ((disk->flags & GENHD_FL_NOTIFY_REMAPPED_ONLY) || 
+                       (p->swap_remap[offset] & 0x80000000))
+                       goto out;
+-
+               old = offset;
+               goto notify;
+       }
+@@ -329,7 +328,7 @@
+       p->gaps_exist += 1;
+ notify:
+       if (disk->fops->swap_slot_free_notify)
+-              disk->fops->swap_slot_free_notify(p->bdev, old);
++              disk->fops->swap_slot_free_notify(p->bdev, old*(PAGE_SIZE >> 9));
+ out:
+       spin_unlock(&p->remap_lock);
+       return 0;