diff options
author | Matthew Wilcox <mawilcox@microsoft.com> | 2018-04-10 16:29:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-11 10:28:31 -0700 |
commit | 8a97ea546bb6532f77a0efe165012ee0d0c4b903 (patch) | |
tree | 9252baf2fa28f0217c4791f1c41e9f51dd7a08ce /mm | |
parent | 1ec6995d1290bfb87cc3a51f0836c889e857cef9 (diff) | |
download | linux-stable-8a97ea546bb6532f77a0efe165012ee0d0c4b903.tar.gz linux-stable-8a97ea546bb6532f77a0efe165012ee0d0c4b903.tar.bz2 linux-stable-8a97ea546bb6532f77a0efe165012ee0d0c4b903.zip |
mm/z3fold.c: use gfpflags_allow_blocking
We have a perfectly good macro to determine whether the gfp flags allow
you to sleep or not; use it instead of trying to infer it.
Link: http://lkml.kernel.org/r/20180408062206.GC16007@bombadil.infradead.org
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/z3fold.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/z3fold.c b/mm/z3fold.c index c6b1fb0d85a5..c0bca6153b95 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -538,7 +538,7 @@ static int z3fold_alloc(struct z3fold_pool *pool, size_t size, gfp_t gfp, struct z3fold_header *zhdr = NULL; struct page *page = NULL; enum buddy bud; - bool can_sleep = (gfp & __GFP_RECLAIM) == __GFP_RECLAIM; + bool can_sleep = gfpflags_allow_blocking(gfp); if (!size || (gfp & __GFP_HIGHMEM)) return -EINVAL; |