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

Commit d052c50e authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: Allow only __GFP_CMA allocations from Movable zone"

parents 660391ec 0157fbd7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -420,7 +420,14 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
static inline enum zone_type gfp_zone(gfp_t flags)
{
	enum zone_type z;
	int bit = (__force int) (flags & GFP_ZONEMASK);
	int bit;

	if (!IS_ENABLED(CONFIG_HIGHMEM)) {
		if ((flags & __GFP_MOVABLE) && !(flags & __GFP_CMA))
			flags &= ~__GFP_HIGHMEM;
	}

	bit = (__force int) (flags & GFP_ZONEMASK);

	z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) &
					 ((1 << GFP_ZONES_SHIFT) - 1);