summaryrefslogtreecommitdiffstats
path: root/drivers/char/selection.c
diff options
context:
space:
mode:
authorArnd Bergmann2010-06-01 22:53:08 +0200
committerGreg Kroah-Hartman2010-08-10 22:47:44 +0200
commitddcd9fb66ae7f448b517242c10a31d4e17bcad45 (patch)
tree54c5894f3c1dd45580cd45c621bbeb9174da879b /drivers/char/selection.c
parenttty: untangle locking of wait_until_sent (diff)
downloadkernel-qcow2-linux-ddcd9fb66ae7f448b517242c10a31d4e17bcad45.tar.gz
kernel-qcow2-linux-ddcd9fb66ae7f448b517242c10a31d4e17bcad45.tar.xz
kernel-qcow2-linux-ddcd9fb66ae7f448b517242c10a31d4e17bcad45.zip
tty: remove tty_lock_nested
This changes all remaining users of tty_lock_nested to be non-recursive, which lets us kill this function. As a consequence, we won't need to keep the lock count any more, which allows more simplifications later. 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>
Diffstat (limited to 'drivers/char/selection.c')
-rw-r--r--drivers/char/selection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/selection.c b/drivers/char/selection.c
index 75889cd9375f..ebae344ce910 100644
--- a/drivers/char/selection.c
+++ b/drivers/char/selection.c
@@ -313,7 +313,8 @@ int paste_selection(struct tty_struct *tty)
struct tty_ldisc *ld;
DECLARE_WAITQUEUE(wait, current);
- tty_lock_nested(); /* always called with BTM from vt_ioctl */
+ /* always called with BTM from vt_ioctl */
+ WARN_ON(!tty_locked());
acquire_console_sem();
poke_blanked_console();
@@ -343,6 +344,5 @@ int paste_selection(struct tty_struct *tty)
__set_current_state(TASK_RUNNING);
tty_ldisc_deref(ld);
- tty_unlock();
return 0;
}