]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
vdo: omit need_resched() before cond_resched()
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 14 Jul 2025 16:27:46 +0000 (18:27 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Thu, 31 Jul 2025 13:39:55 +0000 (15:39 +0200)
There's no need to call need_resched() because cond_resched() will do
nothing if need_resched() returns false.

Reviewed-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-vdo/funnel-workqueue.c

index ae11941c90a92bf86a2319bc0cba2222634cebbd..0613c82bbe8eabf3a36d027e002449007b420be7 100644 (file)
@@ -252,8 +252,7 @@ static void service_work_queue(struct simple_work_queue *queue)
                 * This speeds up some performance tests; that "other work" might include other VDO
                 * threads.
                 */
-               if (need_resched())
-                       cond_resched();
+               cond_resched();
        }
 
        run_finish_hook(queue);