[PATCH] Revert "tty: Push the bkl down a bit in the hangup code"

From: Ingo Molnar
Date: Sat Dec 12 2009 - 05:07:46 EST


This reverts commit 38c70b27f9502c31c1d0c29676275f7362cdb0d9.

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index cc941a3..c408c81 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -505,6 +505,8 @@ static void do_tty_hangup(struct work_struct *work)
if (!tty)
return;

+ /* inuse_filps is protected by the single kernel lock */
+ lock_kernel();

spin_lock(&redirect_lock);
if (redirect && redirect->private_data == tty) {
@@ -513,8 +515,6 @@ static void do_tty_hangup(struct work_struct *work)
}
spin_unlock(&redirect_lock);

- /* inuse_filps is protected by the single kernel lock */
- lock_kernel();
check_tty_count(tty, "do_tty_hangup");
file_list_lock();
/* This breaks for file handles being sent over AF_UNIX sockets ? */