]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - lib/idr.c
Merge tag 'mac80211-next-for-davem-2015-12-07' into next
[karo-tx-linux.git] / lib / idr.c
index 5335c43adf46af55bb90717aa63afe33a6a30e9c..6098336df2672e09f0d022aa5c1a1c8252aa73c7 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -399,7 +399,7 @@ void idr_preload(gfp_t gfp_mask)
         * allocation guarantee.  Disallow usage from those contexts.
         */
        WARN_ON_ONCE(in_interrupt());
-       might_sleep_if(gfp_mask & __GFP_WAIT);
+       might_sleep_if(gfpflags_allow_blocking(gfp_mask));
 
        preempt_disable();
 
@@ -453,7 +453,7 @@ int idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask)
        struct idr_layer *pa[MAX_IDR_LEVEL + 1];
        int id;
 
-       might_sleep_if(gfp_mask & __GFP_WAIT);
+       might_sleep_if(gfpflags_allow_blocking(gfp_mask));
 
        /* sanity checks */
        if (WARN_ON_ONCE(start < 0))