]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
fs3270: remove extra locks
authorAlan Cox <alan@redhat.com>
Mon, 13 Oct 2008 09:45:52 +0000 (10:45 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Oct 2008 16:51:44 +0000 (09:51 -0700)
get_current_tty now does internal locking and returns a referenced object,
thus our use of tty_mutex here can go away.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/s390/char/fs3270.c

index 84fbc90480dcb858f310b6fdfab4403a110e4ca3..1227f4591f8d76078631a73d1cd61f1a4045cd06 100644 (file)
@@ -426,18 +426,14 @@ fs3270_open(struct inode *inode, struct file *filp)
        minor = iminor(filp->f_path.dentry->d_inode);
        /* Check for minor 0 multiplexer. */
        if (minor == 0) {
-               struct tty_struct *tty;
-               mutex_lock(&tty_mutex);
-               tty = get_current_tty();
+               struct tty_struct *tty = get_current_tty();
                if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) {
                        tty_kref_put(tty);
-                       mutex_unlock(&tty_mutex);
                        rc = -ENODEV;
                        goto out;
                }
                minor = tty->index + RAW3270_FIRSTMINOR;
                tty_kref_put(tty);
-               mutex_unlock(&tty_mutex);
        }
        /* Check if some other program is already using fullscreen mode. */
        fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor);