[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081013094542.21645.48171.stgit@localhost.localdomain>
Date: Mon, 13 Oct 2008 10:45:52 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: [PATCH 78/80] fs3270: remove extra locks
From: Alan Cox <alan@...hat.com>
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@...hat.com>
---
drivers/s390/char/fs3270.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index 84fbc90..1227f45 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists