From ddcd9fb66ae7f448b517242c10a31d4e17bcad45 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 1 Jun 2010 22:53:08 +0200 Subject: 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 Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman --- include/linux/tty.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'include') diff --git a/include/linux/tty.h b/include/linux/tty.h index 955d72ea71c..0fbafb0b69b 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -417,6 +417,7 @@ extern int is_ignored(int sig); extern int tty_signal(int sig, struct tty_struct *tty); extern void tty_hangup(struct tty_struct *tty); extern void tty_vhangup(struct tty_struct *tty); +extern void tty_vhangup_locked(struct tty_struct *tty); extern void tty_vhangup_self(void); extern void tty_unhangup(struct file *filp); 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, unsigned int cmd, unsigned long arg); /* functions for preparation of BKL removal */ - -/* - * tty_lock_nested get the tty_lock while potentially holding it - * - * The Big TTY Mutex is a recursive lock, meaning you can take it - * from a thread that is already holding it. - * This is bad for a number of reasons, so tty_lock_nested should - * really be used as rarely as possible. If a code location can - * be shown to never get called with this held already, it should - * use tty_lock() instead. - */ -static inline void __lockfunc tty_lock_nested(void) __acquires(kernel_lock) -{ - lock_kernel(); -} static inline void tty_lock(void) __acquires(kernel_lock) { #ifdef CONFIG_LOCK_KERNEL -- cgit v1.2.3