Commit 5cbb5f57 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Martin Schwidefsky

[S390] 3270: remove BKL

Replace BLK use in fs3270 with mutex.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent feb5c5a4
...@@ -38,6 +38,8 @@ struct fs3270 { ...@@ -38,6 +38,8 @@ struct fs3270 {
size_t rdbuf_size; /* size of data returned by RDBUF */ size_t rdbuf_size; /* size of data returned by RDBUF */
}; };
static DEFINE_MUTEX(fs3270_mutex);
static void static void
fs3270_wake_up(struct raw3270_request *rq, void *data) fs3270_wake_up(struct raw3270_request *rq, void *data)
{ {
...@@ -328,7 +330,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -328,7 +330,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (!fp) if (!fp)
return -ENODEV; return -ENODEV;
rc = 0; rc = 0;
lock_kernel(); mutex_lock(&fs3270_mutex);
switch (cmd) { switch (cmd) {
case TUBICMD: case TUBICMD:
fp->read_command = arg; fp->read_command = arg;
...@@ -354,7 +356,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -354,7 +356,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
rc = -EFAULT; rc = -EFAULT;
break; break;
} }
unlock_kernel(); mutex_unlock(&fs3270_mutex);
return rc; return rc;
} }
...@@ -437,7 +439,7 @@ fs3270_open(struct inode *inode, struct file *filp) ...@@ -437,7 +439,7 @@ fs3270_open(struct inode *inode, struct file *filp)
minor = tty->index + RAW3270_FIRSTMINOR; minor = tty->index + RAW3270_FIRSTMINOR;
tty_kref_put(tty); tty_kref_put(tty);
} }
lock_kernel(); mutex_lock(&fs3270_mutex);
/* Check if some other program is already using fullscreen mode. */ /* Check if some other program is already using fullscreen mode. */
fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor); fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor);
if (!IS_ERR(fp)) { if (!IS_ERR(fp)) {
...@@ -478,7 +480,7 @@ fs3270_open(struct inode *inode, struct file *filp) ...@@ -478,7 +480,7 @@ fs3270_open(struct inode *inode, struct file *filp)
} }
filp->private_data = fp; filp->private_data = fp;
out: out:
unlock_kernel(); mutex_unlock(&fs3270_mutex);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment