]> Pileus Git - ~andy/linux/blobdiff - drivers/char/tty_port.c
Merge branch 'for-linus' of git://neil.brown.name/md
[~andy/linux] / drivers / char / tty_port.c
index a3bd1d0b66cfe3fbba3bf9592c0bfbab26bb88a3..33d37d230f8f4335ee9d85336bcb3816c6e968f0 100644 (file)
@@ -231,7 +231,7 @@ int tty_port_block_til_ready(struct tty_port *port,
 
        /* block if port is in the process of being closed */
        if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
-               wait_event_interruptible(port->close_wait,
+               wait_event_interruptible_tty(port->close_wait,
                                !(port->flags & ASYNC_CLOSING));
                if (port->flags & ASYNC_HUP_NOTIFY)
                        return -EAGAIN;
@@ -294,7 +294,9 @@ int tty_port_block_til_ready(struct tty_port *port,
                        retval = -ERESTARTSYS;
                        break;
                }
+               tty_unlock();
                schedule();
+               tty_lock();
        }
        finish_wait(&port->open_wait, &wait);