diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
commit | da733563be5a9da26fe81d9f007262d00b846e22 (patch) | |
tree | db28291df94a2043af2123911984c5c173da4e6f /drivers/tty/tty_mutex.c | |
parent | 6ccbcf2cb41131f8d56ef0723bf3f7c1f8486076 (diff) | |
parent | dab78d7924598ea4031663dd10db814e2e324928 (diff) |
Merge branch 'next' into for-linus
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); |