mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and...
[cascardo/linux.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_cmn.c
index 44173be..f8d7a2f 100644 (file)
@@ -691,7 +691,7 @@ static void *bnx2x_frag_alloc(const struct bnx2x_fastpath *fp, gfp_t gfp_mask)
 {
        if (fp->rx_frag_size) {
                /* GFP_KERNEL allocations are used only during initialization */
-               if (unlikely(gfp_mask & __GFP_WAIT))
+               if (unlikely(gfpflags_allow_blocking(gfp_mask)))
                        return (void *)__get_free_page(gfp_mask);
 
                return netdev_alloc_frag(fp->rx_frag_size);