]> err.no Git - linux-2.6/blobdiff - mm/swap_state.c
[PATCH] ide: clean up pdc202xx_old so its more readable (done so I could work on...
[linux-2.6] / mm / swap_state.c
index d7af296833fcbc1b3dccfbde33db51fb2fd3934a..7535211bb495c9f54a3ece2e37feaa4c0589162d 100644 (file)
@@ -24,7 +24,7 @@
  * vmscan's shrink_list, to make sync_page look nicer, and to allow
  * future use of radix_tree tags in the swap cache.
  */
-static struct address_space_operations swap_aops = {
+static const struct address_space_operations swap_aops = {
        .writepage      = swap_writepage,
        .sync_page      = block_sync_page,
        .set_page_dirty = __set_page_dirty_nobuffers,
@@ -148,8 +148,7 @@ int add_to_swap(struct page * page, gfp_t gfp_mask)
        swp_entry_t entry;
        int err;
 
-       if (!PageLocked(page))
-               BUG();
+       BUG_ON(!PageLocked(page));
 
        for (;;) {
                entry = get_swap_page();