netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huangzhaoyang <huangzhaoyang@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Zhaoyang Huang <zhaoyang.huang@unisoc.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net: remove judgement based on gfp_flags
Date: Thu, 23 Dec 2021 09:56:07 +0800	[thread overview]
Message-ID: <1640224567-3014-1-git-send-email-huangzhaoyang@gmail.com> (raw)

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.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
 net/netlink/af_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
-- 
1.9.1


             reply	other threads:[~2021-12-23  1:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23  1:56 Huangzhaoyang [this message]
2021-12-23 17:11 ` [PATCH] net: remove judgement based on gfp_flags Jakub Kicinski
2021-12-27  6:14   ` Zhaoyang Huang
2021-12-27  7:38     ` Zhaoyang Huang
2021-12-28  2:02       ` Jakub Kicinski
2022-01-04  2:57 ` [net] 6f87debdea: BUG:scheduling_while_atomic kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1640224567-3014-1-git-send-email-huangzhaoyang@gmail.com \
    --to=huangzhaoyang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zhaoyang.huang@unisoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).