Skip to content

Commit 103f5d8

Browse files
Mikulas Patockagregkh
authored andcommitted
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>
1 parent a48e897 commit 103f5d8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/tty/tty_buffer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,7 @@ static void flush_to_ldisc(struct work_struct *work)
499499
if (!rcvd)
500500
break;
501501

502-
if (need_resched())
503-
cond_resched();
502+
cond_resched();
504503
}
505504

506505
mutex_unlock(&buf->lock);

0 commit comments

Comments
 (0)