From 203652192634c1fce5e79df0a8ff2fabfaefd3ab Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 1 Jun 2010 22:53:07 +0200 Subject: tty: untangle locking of wait_until_sent Some wait_until_sent versions require the big tty mutex, others don't and some callers of wait_until_sent already hold it while other don't. That leads to recursive use of the BTM in these functions, which we're trying to get rid of. This turns all cleans up the locking there so that the driver's wait_until_sent function never takes the BTM itself if it is already called with that lock held. Signed-off-by: Arnd Bergmann Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/serial/68360serial.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/serial/68360serial.c') diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index 16f5f2fab032..edcf1cc089d1 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c @@ -1705,7 +1705,6 @@ static void rs_360_wait_until_sent(struct tty_struct *tty, int timeout) printk("jiff=%lu...", jiffies); #endif - tty_lock_nested(); /* always held already since we come from ->close */ /* We go through the loop at least once because we can't tell * exactly when the last character exits the shifter. There can * be at least two characters waiting to be sent after the buffers @@ -1734,7 +1733,6 @@ static void rs_360_wait_until_sent(struct tty_struct *tty, int timeout) bdp--; } while (bdp->status & BD_SC_READY); current->state = TASK_RUNNING; - tty_unlock(); #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies); #endif -- cgit v1.2.2