Message ID | 20250310124017.187-1-alexei.starovoitov@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [bpf-next] mm: Fix the flipped condition in gfpflags_allow_spinning() | expand |
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <andrii@kernel.org>: On Mon, 10 Mar 2025 13:40:17 +0100 you wrote: > From: Vlastimil Babka <vbabka@suse.cz> > > The function gfpflags_allow_spinning() has a bug that makes it return > the opposite result than intended. This could contribute to deadlocks as > usage profilerates, for now it was noticed as a performance regression > due to try_charge_memcg() not refilling memcg stock when it could. Fix > the flipped condition. > > [...] Here is the summary with links: - [bpf-next] mm: Fix the flipped condition in gfpflags_allow_spinning() https://git.kernel.org/bpf/bpf-next/c/157a50236c30 You are awesome, thank you!
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index ceb226c2e25c..c9fa6309c903 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -55,7 +55,7 @@ static inline bool gfpflags_allow_spinning(const gfp_t gfp_flags) * regular page allocator doesn't fully support this * allocation mode. */ - return !(gfp_flags & __GFP_RECLAIM); + return !!(gfp_flags & __GFP_RECLAIM); } #ifdef CONFIG_HIGHMEM