diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-06-01 16:53:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 16:47:44 -0400 |
commit | ddcd9fb66ae7f448b517242c10a31d4e17bcad45 (patch) | |
tree | 54c5894f3c1dd45580cd45c621bbeb9174da879b /include/linux/tty.h | |
parent | 203652192634c1fce5e79df0a8ff2fabfaefd3ab (diff) |
tty: remove tty_lock_nested
This changes all remaining users of tty_lock_nested
to be non-recursive, which lets us kill this function.
As a consequence, we won't need to keep the lock count
any more, which allows more simplifications later.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 955d72ea71c0..0fbafb0b69bf 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -417,6 +417,7 @@ extern int is_ignored(int sig); | |||
417 | extern int tty_signal(int sig, struct tty_struct *tty); | 417 | extern int tty_signal(int sig, struct tty_struct *tty); |
418 | extern void tty_hangup(struct tty_struct *tty); | 418 | extern void tty_hangup(struct tty_struct *tty); |
419 | extern void tty_vhangup(struct tty_struct *tty); | 419 | extern void tty_vhangup(struct tty_struct *tty); |
420 | extern void tty_vhangup_locked(struct tty_struct *tty); | ||
420 | extern void tty_vhangup_self(void); | 421 | extern void tty_vhangup_self(void); |
421 | extern void tty_unhangup(struct file *filp); | 422 | extern void tty_unhangup(struct file *filp); |
422 | extern int tty_hung_up_p(struct file *filp); | 423 | extern int tty_hung_up_p(struct file *filp); |
@@ -578,21 +579,6 @@ extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file, | |||
578 | unsigned int cmd, unsigned long arg); | 579 | unsigned int cmd, unsigned long arg); |
579 | 580 | ||
580 | /* functions for preparation of BKL removal */ | 581 | /* functions for preparation of BKL removal */ |
581 | |||
582 | /* | ||
583 | * tty_lock_nested get the tty_lock while potentially holding it | ||
584 | * | ||
585 | * The Big TTY Mutex is a recursive lock, meaning you can take it | ||
586 | * from a thread that is already holding it. | ||
587 | * This is bad for a number of reasons, so tty_lock_nested should | ||
588 | * really be used as rarely as possible. If a code location can | ||
589 | * be shown to never get called with this held already, it should | ||
590 | * use tty_lock() instead. | ||
591 | */ | ||
592 | static inline void __lockfunc tty_lock_nested(void) __acquires(kernel_lock) | ||
593 | { | ||
594 | lock_kernel(); | ||
595 | } | ||
596 | static inline void tty_lock(void) __acquires(kernel_lock) | 582 | static inline void tty_lock(void) __acquires(kernel_lock) |
597 | { | 583 | { |
598 | #ifdef CONFIG_LOCK_KERNEL | 584 | #ifdef CONFIG_LOCK_KERNEL |