mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
tty: Remove warning in tty_lock_slave()
Commit2aff5e2bc6
('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 commit2febdb632b
('tty: Preset lock subclass for nested tty locks'). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2e4081367b
commit
eef15e2a54
1 changed files with 1 additions and 5 deletions
|
@ -46,12 +46,8 @@ EXPORT_SYMBOL(tty_unlock);
|
|||
|
||||
void __lockfunc tty_lock_slave(struct tty_struct *tty)
|
||||
{
|
||||
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);
|
||||
if (tty && tty != tty->link)
|
||||
tty_lock(tty);
|
||||
}
|
||||
}
|
||||
|
||||
void __lockfunc tty_unlock_slave(struct tty_struct *tty)
|
||||
|
|
Loading…
Reference in a new issue