]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/swap_state.c
[NET]: Remove more unneeded typecasts on *malloc()
[linux-2.6-omap-h63xx.git] / mm / swap_state.c
index fc2aecb70a95c9e3559a2d4d1d4a2ae0700ebc50..7b09ac503fec9dde77422705a08b2a1f087d0d70 100644 (file)
@@ -141,7 +141,7 @@ void __delete_from_swap_cache(struct page *page)
  * Allocate swap space for the page and add the page to the
  * swap cache.  Caller needs to hold the page lock. 
  */
-int add_to_swap(struct page * page)
+int add_to_swap(struct page * page, gfp_t gfp_mask)
 {
        swp_entry_t entry;
        int err;
@@ -166,7 +166,7 @@ int add_to_swap(struct page * page)
                 * Add it to the swap cache and mark it dirty
                 */
                err = __add_to_swap_cache(page, entry,
-                               GFP_ATOMIC|__GFP_NOMEMALLOC|__GFP_NOWARN);
+                               gfp_mask|__GFP_NOMEMALLOC|__GFP_NOWARN);
 
                switch (err) {
                case 0:                         /* Success */