From 0272a160103f75c46e10ae6aa3435e9fde0d077c Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 20 Jul 2021 20:40:42 +0900 Subject: [PATCH] net_ioballoc: remove redundant critical section --- net/utils/net_lock.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/utils/net_lock.c b/net/utils/net_lock.c index d99c1f6b89..13e2c47350 100644 --- a/net/utils/net_lock.c +++ b/net/utils/net_lock.c @@ -499,7 +499,6 @@ FAR struct iob_s *net_ioballoc(bool throttled, enum iob_user_e consumerid) iob = iob_tryalloc(throttled, consumerid); if (iob == NULL) { - irqstate_t flags; unsigned int count; int blresult; @@ -507,15 +506,12 @@ FAR struct iob_s *net_ioballoc(bool throttled, enum iob_user_e consumerid) * become available. But let's not do that with the network locked. */ - flags = enter_critical_section(); blresult = net_breaklock(&count); iob = iob_alloc(throttled, consumerid); if (blresult >= 0) { net_restorelock(count); } - - leave_critical_section(flags); } return iob;