]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: remove redundant __GFP_NOWARN
authorQianfeng Rong <rongqianfeng@vivo.com>
Thu, 7 Aug 2025 14:49:43 +0000 (22:49 +0800)
committerSean Christopherson <seanjc@google.com>
Tue, 19 Aug 2025 18:51:13 +0000 (11:51 -0700)
Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
GFP_NOWAIT implicitly include __GFP_NOWARN.

Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
`GFP_NOWAIT | __GFP_NOWARN`) is now redundant.  Let's clean up these
redundant flags across subsystems.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Link: https://lore.kernel.org/r/20250807144943.581663-1-rongqianfeng@vivo.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
virt/kvm/async_pf.c

index 0ee4816b079acb005b02e2c64470b50b020a854e..b8aaa96b799bf08a98ab0ec662328a6b93e39d25 100644 (file)
@@ -192,7 +192,7 @@ bool kvm_setup_async_pf(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
         * do alloc nowait since if we are going to sleep anyway we
         * may as well sleep faulting in page
         */
-       work = kmem_cache_zalloc(async_pf_cache, GFP_NOWAIT | __GFP_NOWARN);
+       work = kmem_cache_zalloc(async_pf_cache, GFP_NOWAIT);
        if (!work)
                return false;