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>
This commit is contained in:
Arnd Bergmann
2010-06-01 22:53:01 +02:00
committed by Greg Kroah-Hartman
parent 3f582b8c11
commit ec79d6056d
17 changed files with 161 additions and 115 deletions

View File

@@ -463,10 +463,10 @@ vcs_open(struct inode *inode, struct file *filp)
unsigned int currcons = iminor(inode) & 127;
int ret = 0;
lock_kernel();
tty_lock();
if(currcons && !vc_cons_allocated(currcons-1))
ret = -ENXIO;
unlock_kernel();
tty_unlock();
return ret;
}