Skip to content

Commit 225b2cb

Browse files
author
Mikulas Patocka
committed
vdo: omit need_resched() before cond_resched()
There's no need to call need_resched() because cond_resched() will do nothing if need_resched() returns false. Reviewed-by: Matthew Sakai <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent 487767b commit 225b2cb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/md/dm-vdo/funnel-workqueue.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ static void service_work_queue(struct simple_work_queue *queue)
252252
* This speeds up some performance tests; that "other work" might include other VDO
253253
* threads.
254254
*/
255-
if (need_resched())
256-
cond_resched();
255+
cond_resched();
257256
}
258257

259258
run_finish_hook(queue);

0 commit comments

Comments
 (0)