X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=lib%2Fidr.c;h=6098336df2672e09f0d022aa5c1a1c8252aa73c7;hb=9b18d42dda985c99db4adde45bbdf7cd79a7525c;hp=5335c43adf46af55bb90717aa63afe33a6a30e9c;hpb=cd369c2239dd08c273c0fafbbea44e3e0c509ebd;p=karo-tx-linux.git diff --git a/lib/idr.c b/lib/idr.c index 5335c43adf46..6098336df267 100644 --- 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))