public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: lustre: fix GFP_ATOMIC macro usage
@ 2014-01-17  8:46 Marek Szyprowski
  2014-01-17 14:33 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Szyprowski @ 2014-01-17  8:46 UTC (permalink / raw)
  To: linux-kernel, devel
  Cc: Marek Szyprowski, Greg Kroah-Hartman, Andreas Dilger, Peng Tao

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.szyprowski@samsung.com>
---
 .../lustre/include/linux/libcfs/libcfs_private.h   |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index d0d942c..dddccca1 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -120,7 +120,7 @@ do {						\
 do {									    \
 	LASSERT(!in_interrupt() ||					    \
 		((size) <= LIBCFS_VMALLOC_SIZE &&			    \
-		 ((mask) & GFP_ATOMIC)) != 0);			    \
+		 ((mask) & __GFP_WAIT) == 0));				    \
 } while (0)
 
 #define LIBCFS_ALLOC_POST(ptr, size)					    \
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-01-22  1:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17  8:46 [PATCH] staging: lustre: fix GFP_ATOMIC macro usage Marek Szyprowski
2014-01-17 14:33 ` Greg Kroah-Hartman
2014-01-17 14:51   ` Dan Carpenter
2014-01-17 15:17     ` Greg Kroah-Hartman
2014-01-21 20:02       ` Dilger, Andreas
2014-01-21 20:16         ` Dan Carpenter
2014-01-22  1:31           ` Drokin, Oleg
2014-01-21 21:15         ` Dave Hansen
2014-01-22  1:52           ` Drokin, Oleg
2014-01-20  8:18   ` Marek Szyprowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox