Skip to contentSkip to conversation

net/core.c : remove redundant state settings after waking up

PATCH New Lizhe 1 participant 1 message Jan 10, 2023

Subsystems (2)
lore
Share & tools
lore

Lizhe

author
#0 lore raw

PATCH v2 1/1 net/core.c : remove redundant state settings after waking up

when schedule() returns, the current state is TASK_RUNNING, no need to set its status to TASK_INTERRUPTIBLE, and after jumping out of the wile loop, its status will be set to TASK_RUNNING, so, set_current_state(TASK_INTERRUPTIBLE) is redundant

---
 net/core/dev.c | 1 -
 1 file changed, 1 deletion(-)
net/core/dev.c +0 -1
index b76fb37b381e..4bd2d4b954c9 100644
@@ -6580,7 +6580,6 @@ static int napi_thread_wait(struct napi_struct *napi)
 		schedule();
 		/* woken being true indicates this thread owns this napi. */
 		woken = true;
-		set_current_state(TASK_INTERRUPTIBLE);
 	}
 	__set_current_state(TASK_RUNNING);
 
Signature · 1 line
2.17.1