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:
Alan Cox
2012-05-03 22:24:08 +01:00
committed by Greg Kroah-Hartman
parent d739e65bb2
commit d29f3ef39b
15 changed files with 155 additions and 103 deletions

View File

@@ -3336,9 +3336,9 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
}
DBGINFO(("%s block_til_ready wait\n", tty->driver->name));
tty_unlock();
tty_unlock(tty);
schedule();
tty_lock();
tty_lock(tty);
}
set_current_state(TASK_RUNNING);