vserver 1.9.3
[linux-2.6.git] / mm / mempool.c
index da6ad1e..8dec877 100644 (file)
@@ -89,11 +89,6 @@ mempool_t * mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
 }
 EXPORT_SYMBOL(mempool_create);
 
-/*
- * mempool_resize is disabled for now, because it has no callers.  Feel free
- * to turn it back on if needed.
- */
-#if 0
 /**
  * mempool_resize - resize an existing memory pool
  * @pool:       pointer to the memory pool which was allocated via
@@ -163,7 +158,6 @@ out:
        return 0;
 }
 EXPORT_SYMBOL(mempool_resize);
-#endif
 
 /**
  * mempool_destroy - deallocate a memory pool
@@ -200,6 +194,7 @@ void * mempool_alloc(mempool_t *pool, int gfp_mask)
        DEFINE_WAIT(wait);
        int gfp_nowait = gfp_mask & ~(__GFP_WAIT | __GFP_IO);
 
+       might_sleep_if(gfp_mask & __GFP_WAIT);
 repeat_alloc:
        element = pool->alloc(gfp_nowait|__GFP_NOWARN, pool->pool_data);
        if (likely(element != NULL))