Commit eef15e2a authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

tty: Remove warning in tty_lock_slave()

Commit 2aff5e2b ('tty: Change
tty lock order to master->slave') added a warning which is broken
and unnecessary now that the tty lock has fixed lock subclasses,
added in commit 2febdb63
('tty: Preset lock subclass for nested tty locks').
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e408136
...@@ -46,12 +46,8 @@ EXPORT_SYMBOL(tty_unlock); ...@@ -46,12 +46,8 @@ EXPORT_SYMBOL(tty_unlock);
void __lockfunc tty_lock_slave(struct tty_struct *tty) void __lockfunc tty_lock_slave(struct tty_struct *tty)
{ {
if (tty && tty != tty->link) { if (tty && tty != tty->link)
WARN_ON(!mutex_is_locked(&tty->link->legacy_mutex) ||
!tty->driver->type == TTY_DRIVER_TYPE_PTY ||
!tty->driver->type == PTY_TYPE_SLAVE);
tty_lock(tty); tty_lock(tty);
}
} }
void __lockfunc tty_unlock_slave(struct tty_struct *tty) void __lockfunc tty_unlock_slave(struct tty_struct *tty)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment