diff options
| author | Ingo Molnar <[email protected]> | 2015-02-24 08:41:07 +0100 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2015-02-24 08:41:07 +0100 |
| commit | 2ae79026818e7d49fead82b79b1a543e3b9c8a23 (patch) | |
| tree | c7ee7bd8b37b0880918d361839fd95988fac2dac /drivers/tty/tty_mutex.c | |
| parent | 1a99367023f6ac664365a37fa508b059e31d0e88 (diff) | |
| parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
Merge tag 'v4.0-rc1' into locking/core, to refresh the tree before merging new changes
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/tty/tty_mutex.c')
| -rw-r--r-- | drivers/tty/tty_mutex.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/tty/tty_mutex.c b/drivers/tty/tty_mutex.c index 4486741190c4..0efcf713b756 100644 --- a/drivers/tty/tty_mutex.c +++ b/drivers/tty/tty_mutex.c @@ -4,18 +4,8 @@ #include <linux/semaphore.h> #include <linux/sched.h> -/* - * Nested tty locks are necessary for releasing pty pairs. - * The stable lock order is master pty first, then slave pty. - */ - /* Legacy tty mutex glue */ -enum { - TTY_MUTEX_NORMAL, - TTY_MUTEX_SLAVE, -}; - /* * Getting the big tty mutex. */ @@ -46,12 +36,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) @@ -62,5 +48,5 @@ void __lockfunc tty_unlock_slave(struct tty_struct *tty) void tty_set_lock_subclass(struct tty_struct *tty) { - lockdep_set_subclass(&tty->legacy_mutex, TTY_MUTEX_SLAVE); + lockdep_set_subclass(&tty->legacy_mutex, TTY_LOCK_SLAVE); } |