diff options
Diffstat (limited to 'drivers/tty/tty_mutex.c')
-rw-r--r-- | drivers/tty/tty_mutex.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/tty/tty_mutex.c b/drivers/tty/tty_mutex.c index 3b2bb7719442..9ff986c32a21 100644 --- a/drivers/tty/tty_mutex.c +++ b/drivers/tty/tty_mutex.c | |||
@@ -15,30 +15,18 @@ | |||
15 | * Don't use in new code. | 15 | * Don't use in new code. |
16 | */ | 16 | */ |
17 | static DEFINE_MUTEX(big_tty_mutex); | 17 | static DEFINE_MUTEX(big_tty_mutex); |
18 | struct task_struct *__big_tty_mutex_owner; | ||
19 | EXPORT_SYMBOL_GPL(__big_tty_mutex_owner); | ||
20 | 18 | ||
21 | /* | 19 | /* |
22 | * Getting the big tty mutex. | 20 | * Getting the big tty mutex. |
23 | */ | 21 | */ |
24 | void __lockfunc tty_lock(void) | 22 | void __lockfunc tty_lock(void) |
25 | { | 23 | { |
26 | struct task_struct *task = current; | ||
27 | |||
28 | WARN_ON(__big_tty_mutex_owner == task); | ||
29 | |||
30 | mutex_lock(&big_tty_mutex); | 24 | mutex_lock(&big_tty_mutex); |
31 | __big_tty_mutex_owner = task; | ||
32 | } | 25 | } |
33 | EXPORT_SYMBOL(tty_lock); | 26 | EXPORT_SYMBOL(tty_lock); |
34 | 27 | ||
35 | void __lockfunc tty_unlock(void) | 28 | void __lockfunc tty_unlock(void) |
36 | { | 29 | { |
37 | struct task_struct *task = current; | ||
38 | |||
39 | WARN_ON(__big_tty_mutex_owner != task); | ||
40 | __big_tty_mutex_owner = NULL; | ||
41 | |||
42 | mutex_unlock(&big_tty_mutex); | 30 | mutex_unlock(&big_tty_mutex); |
43 | } | 31 | } |
44 | EXPORT_SYMBOL(tty_unlock); | 32 | EXPORT_SYMBOL(tty_unlock); |