lkml.org 
[lkml]   [2021]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: remove judgement based on gfp_flags
On Thu, 23 Dec 2021 09:56:07 +0800 Huangzhaoyang wrote:
> From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
>
> The parameter allocation here is used for indicating if the memory
> allocation can stall or not. Since we have got the skb buffer, it
> doesn't make sense to check if we can yield on the net's congested
> via gfp_flags. Remove it now.

This is checking if we can sleep AFAICT. What are you trying to fix?

> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index 4c57532..af5b6af 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -1526,7 +1526,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid,
> consume_skb(info.skb2);
>
> if (info.delivered) {
> - if (info.congested && gfpflags_allow_blocking(allocation))
> + if (info.congested)
> yield();
> return 0;
> }

\
 
 \ /
  Last update: 2021-12-23 18:11    [W:0.084 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site