Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: 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.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Link: https://lore.kernel.org/r/5a11ad09-5508-933c-f044-6a236bf00557@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mikulas Patocka and committed by
Greg Kroah-Hartman
103f5d8c a48e897b

+1 -2
+1 -2
drivers/tty/tty_buffer.c
··· 499 499 if (!rcvd) 500 500 break; 501 501 502 - if (need_resched()) 503 - cond_resched(); 502 + cond_resched(); 504 503 } 505 504 506 505 mutex_unlock(&buf->lock);