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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a48e897b69
commit
103f5d8c35
@@ -499,8 +499,7 @@ static void flush_to_ldisc(struct work_struct *work)
|
||||
if (!rcvd)
|
||||
break;
|
||||
|
||||
if (need_resched())
|
||||
cond_resched();
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
mutex_unlock(&buf->lock);
|
||||
|
||||
Reference in New Issue
Block a user