Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40b5623b authored by Charan Teja Reddy's avatar Charan Teja Reddy
Browse files

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: 6b274863 ("mm: ignore boosting for min watermark")
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 6f0fe27e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3628,7 +3628,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
		 *  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];
		}