提交 ce1000dd 编写于 作者: G Greg Kroah-Hartman

Revert "TTY: pty, remove superfluous ptm test"

This reverts commit a50f724a.

Sasha reported that this causes problems, so revert it.

Cc: Alan Cox <alan@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0ef1698e
...@@ -54,7 +54,10 @@ static void pty_close(struct tty_struct *tty, struct file *filp) ...@@ -54,7 +54,10 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
wake_up_interruptible(&tty->link->write_wait); wake_up_interruptible(&tty->link->write_wait);
if (tty->driver->subtype == PTY_TYPE_MASTER) { if (tty->driver->subtype == PTY_TYPE_MASTER) {
set_bit(TTY_OTHER_CLOSED, &tty->flags); set_bit(TTY_OTHER_CLOSED, &tty->flags);
devpts_pty_kill(tty->link); #ifdef CONFIG_UNIX98_PTYS
if (tty->driver == ptm_driver)
devpts_pty_kill(tty->link);
#endif
tty_unlock(); tty_unlock();
tty_vhangup(tty->link); tty_vhangup(tty->link);
tty_lock(); tty_lock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册