tty: replace BKL with a new tty_lock
As a preparation for replacing the big kernel lock
in the TTY layer, wrap all the callers in new
macros tty_lock, tty_lock_nested and tty_unlock.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index b640ef2..622e21c 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -692,9 +692,9 @@
{
int ret;
- lock_kernel();
+ tty_lock();
ret = __ptmx_open(inode, filp);
- unlock_kernel();
+ tty_unlock();
return ret;
}