Updates to -ck series/patches to reflect BFS 404 changes; revert config to 100 Hz...
[kernel-bfs] / kernel-bfs-2.6.28 / debian / patches / patch_swap_notify_core_support_2.6.28.diff
index 2a66eb1..d681471 100644 (file)
@@ -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;