diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-12-30 07:11:11 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-06 14:57:32 -0800 |
commit | e8c9b752b91051a42960f9ef84ffa40450b9a408 (patch) | |
tree | c257777f6ced5edac1bb96ed8094e44cc531d500 /drivers | |
parent | f30f3239d917ff0e16e485c903113ab4fa42c813 (diff) | |
download | linux-stable-e8c9b752b91051a42960f9ef84ffa40450b9a408.tar.gz linux-stable-e8c9b752b91051a42960f9ef84ffa40450b9a408.tar.bz2 linux-stable-e8c9b752b91051a42960f9ef84ffa40450b9a408.zip |
tty: Remove warning in tty_lock_slave()
commit eef15e2a54fad4c2ce3f0a81485dc591ce678f4f upstream.
Commit 2aff5e2bc62db43e05c814461a08aff0fc2b7fe5 ('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 2febdb632bb96235b94b8fccaf882a78f8f4b2bb
('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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/tty_mutex.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/tty_mutex.c b/drivers/tty/tty_mutex.c index 4486741190c4..a872389dc0bc 100644 --- a/drivers/tty/tty_mutex.c +++ b/drivers/tty/tty_mutex.c @@ -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) |