tty_lock: Localise the lock
In each remaining case the tty_lock is associated with a specific tty. This means we can now lock on a per tty basis. We do need tty_lock_pair() for the pty case. Uglier but still a step in the right direction. [fixed up calls in 3 missing drivers - gregkh] Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
d739e65bb2
commit
d29f3ef39b
@@ -3357,9 +3357,9 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
|
||||
printk("%s(%d):%s block_til_ready() count=%d\n",
|
||||
__FILE__,__LINE__, tty->driver->name, port->count );
|
||||
|
||||
tty_unlock();
|
||||
tty_unlock(tty);
|
||||
schedule();
|
||||
tty_lock();
|
||||
tty_lock(tty);
|
||||
}
|
||||
|
||||
set_current_state(TASK_RUNNING);
|
||||
|
Reference in New Issue
Block a user