Re: [PATCH] bpf: Remove redundant __GFP_NOWARN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 04, 2025 at 08:27:30PM +0800, Qianfeng Rong wrote:
> 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@xxxxxxxx>

Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

jirka


> ---
>  kernel/bpf/devmap.c        | 2 +-
>  kernel/bpf/local_storage.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
> index 482d284a1553..2625601de76e 100644
> --- a/kernel/bpf/devmap.c
> +++ b/kernel/bpf/devmap.c
> @@ -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);
> diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c
> index 632d51b05fe9..c93a756e035c 100644
> --- a/kernel/bpf/local_storage.c
> +++ b/kernel/bpf/local_storage.c
> @@ -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;
> -- 
> 2.34.1
> 




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux