]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
bpf: Remove redundant __GFP_NOWARN
authorQianfeng Rong <rongqianfeng@vivo.com>
Mon, 4 Aug 2025 12:27:30 +0000 (20:27 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 12 Aug 2025 21:56:04 +0000 (14:56 -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.

No functional changes.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20250804122731.460158-1-rongqianfeng@vivo.com
kernel/bpf/devmap.c
kernel/bpf/local_storage.c

index 482d284a155386b223b674dcdc1d4909543c3c22..2625601de76e95feed99dbacb7f6b1446fb0d85b 100644 (file)
@@ -865,7 +865,7 @@ static struct bpf_dtab_netdev *__dev_map_alloc_node(struct net *net,
        struct bpf_dtab_netdev *dev;
 
        dev = bpf_map_kmalloc_node(&dtab->map, sizeof(*dev),
-                                  GFP_NOWAIT | __GFP_NOWARN,
+                                  GFP_NOWAIT,
                                   dtab->map.numa_node);
        if (!dev)
                return ERR_PTR(-ENOMEM);
index 632d51b05fe983d649087a05e09177c021c16d33..c93a756e035c02e05276638250640abdf5f79e52 100644 (file)
@@ -165,7 +165,7 @@ static long cgroup_storage_update_elem(struct bpf_map *map, void *key,
        }
 
        new = bpf_map_kmalloc_node(map, struct_size(new, data, map->value_size),
-                                  __GFP_ZERO | GFP_NOWAIT | __GFP_NOWARN,
+                                  __GFP_ZERO | GFP_NOWAIT,
                                   map->numa_node);
        if (!new)
                return -ENOMEM;