mirror of https://gitee.com/openkylin/linux.git
staging: lustre: fix GFP_ATOMIC macro usage
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a33b2fc5a9
commit
1ebf5b72dc
|
@ -120,7 +120,7 @@ do { \
|
||||||
do { \
|
do { \
|
||||||
LASSERT(!in_interrupt() || \
|
LASSERT(!in_interrupt() || \
|
||||||
((size) <= LIBCFS_VMALLOC_SIZE && \
|
((size) <= LIBCFS_VMALLOC_SIZE && \
|
||||||
((mask) & GFP_ATOMIC)) != 0); \
|
((mask) & __GFP_WAIT) == 0)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define LIBCFS_ALLOC_POST(ptr, size) \
|
#define LIBCFS_ALLOC_POST(ptr, size) \
|
||||||
|
|
Loading…
Reference in New Issue