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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a48e897 commit 103f5d8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)