diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 168382baf3702539630dce319d80d45e997087d4..0eaf632ad39eed7c0747d75bf6b93c7eab8e9dfc 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1452,7 +1452,7 @@ static int tty_reopen(struct tty_struct *tty) { struct tty_driver *driver = tty->driver; - if (test_bit(TTY_CLOSING, &tty->flags)) + if (!tty->count) return -EIO; if (driver->type == TTY_DRIVER_TYPE_PTY &&