tty: remove sleep_on
Use wait_event instead of sleep_on in tty_block_til_ready. Wait for ASYNC_CLOSING flag being 0. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
4db2299da2
commit
5fc5b42a3b
@@ -198,7 +198,8 @@ int tty_port_block_til_ready(struct tty_port *port,
|
|||||||
|
|
||||||
/* block if port is in the process of being closed */
|
/* block if port is in the process of being closed */
|
||||||
if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
|
if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
|
||||||
interruptible_sleep_on(&port->close_wait);
|
wait_event_interruptible(port->close_wait,
|
||||||
|
!(port->flags & ASYNC_CLOSING));
|
||||||
if (port->flags & ASYNC_HUP_NOTIFY)
|
if (port->flags & ASYNC_HUP_NOTIFY)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user