Skip to content

Commit 3e2b799

Browse files
qianfengronganakryiko
authored andcommitted
bpf: Remove redundant __GFP_NOWARN
Commit 16f5dfb ("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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Jiri Olsa <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 9e293d4 commit 3e2b799

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernel/bpf/devmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ static struct bpf_dtab_netdev *__dev_map_alloc_node(struct net *net,
865865
struct bpf_dtab_netdev *dev;
866866

867867
dev = bpf_map_kmalloc_node(&dtab->map, sizeof(*dev),
868-
GFP_NOWAIT | __GFP_NOWARN,
868+
GFP_NOWAIT,
869869
dtab->map.numa_node);
870870
if (!dev)
871871
return ERR_PTR(-ENOMEM);

kernel/bpf/local_storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static long cgroup_storage_update_elem(struct bpf_map *map, void *key,
165165
}
166166

167167
new = bpf_map_kmalloc_node(map, struct_size(new, data, map->value_size),
168-
__GFP_ZERO | GFP_NOWAIT | __GFP_NOWARN,
168+
__GFP_ZERO | GFP_NOWAIT,
169169
map->numa_node);
170170
if (!new)
171171
return -ENOMEM;

0 commit comments

Comments
 (0)