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
1 ---
2  mm/swapfile.c |    7 +++----
3  1 files changed, 3 insertions(+), 4 deletions(-)
4
5 Index: kernel-power-2.6.28/mm/swapfile.c
6 ===================================================================
7 --- kernel-power-2.6.28.orig/mm/swapfile.c
8 +++ kernel-power-2.6.28/mm/swapfile.c
9 @@ -285,7 +285,7 @@
10  static int swap_entry_free(struct swap_info_struct *p, unsigned long offset)
11  {
12         int count = p->swap_map[offset];
13 -       unsigned old;
14 +       unsigned long old;
15         struct gendisk *disk;
16  
17         if (count >= SWAP_MAP_MAX)
18 @@ -305,7 +305,7 @@
19         else {
20                 swap_entry_update(p, offset);
21                 if (disk->fops->swap_slot_free_notify)
22 -                       disk->fops->swap_slot_free_notify(p->bdev, offset);
23 +                       disk->fops->swap_slot_free_notify(p->bdev, offset*(PAGE_SIZE >> 9));
24                 return 0;
25         }
26  
27 @@ -317,7 +317,6 @@
28                 if ((disk->flags & GENHD_FL_NOTIFY_REMAPPED_ONLY) || 
29                         (p->swap_remap[offset] & 0x80000000))
30                         goto out;
31 -
32                 old = offset;
33                 goto notify;
34         }
35 @@ -329,7 +328,7 @@
36         p->gaps_exist += 1;
37  notify:
38         if (disk->fops->swap_slot_free_notify)
39 -               disk->fops->swap_slot_free_notify(p->bdev, old);
40 +               disk->fops->swap_slot_free_notify(p->bdev, old*(PAGE_SIZE >> 9));
41  out:
42         spin_unlock(&p->remap_lock);
43         return 0;