mm: correct ALLOC_WMARK_MIN flag check for atomic allocations

ALLOC_WMARK_[MIN|LOW|HIGH] are the indexes into the zones->_watermark
array. Use ALLOC_WMARK_MASK to get a particular water mark alloc flag.
Correct this logic for atomic order-0 allocations watermark check.

Change-Id: I5a74abd579df2ddcca63fdd99a090ca83ccd481c
Fixes: 6b274863bca8 ("mm: ignore boosting for min watermark")
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
This commit is contained in:
Charan Teja Reddy 2019-11-27 18:32:48 +05:30 • committed by Isaac J. Manjarres
commit 0a475ab309

View file

@ -3781,7 +3781,7 @@ retry:
* 3) ALLOC_HARDER - Allow (__GFP_ATOMIC && !__GFP_NOMEMALLOC),
* of the others.
*/
if (unlikely(!order && (alloc_flags & ALLOC_WMARK_MIN) &&
if (unlikely(!order && !(alloc_flags & ALLOC_WMARK_MASK) &&
(alloc_flags & (ALLOC_HARDER | ALLOC_HIGH)))) {
mark = zone->_watermark[WMARK_MIN];
}