GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other
flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an
atomic allocation, the code must test __GFP_WAIT flag presence.

Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
---
 arch/cris/arch-v32/drivers/cryptocop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/cris/arch-v32/drivers/cryptocop.c 
b/arch/cris/arch-v32/drivers/cryptocop.c
index 877da19..7f2e60a 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -306,7 +306,7 @@ static void free_cdesc(struct cryptocop_dma_desc *cdesc)
 
 static struct cryptocop_dma_desc *alloc_cdesc(int alloc_flag)
 {
-       int use_pool = (alloc_flag & GFP_ATOMIC) ? 1 : 0;
+       int use_pool = (alloc_flag & __GFP_WAIT) ? 0 : 1;
        struct cryptocop_dma_desc *cdesc;
 
        if (use_pool) {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to