Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173291
b: refs/heads/master
c: 5cbb5f5
h: refs/heads/master
i:
  173289: d940db6
  173287: 36cc122
v: v3
  • Loading branch information
Martin Schwidefsky authored and Martin Schwidefsky committed Dec 7, 2009
1 parent c58f1aa commit 2ba5d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: feb5c5a450a5e56f3be09a18b541996c86bd94bc
refs/heads/master: 5cbb5f579e5b6f2e686880ffafa64e49323320c1
10 changes: 6 additions & 4 deletions trunk/drivers/s390/char/fs3270.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ struct fs3270 {
size_t rdbuf_size; /* size of data returned by RDBUF */
};

static DEFINE_MUTEX(fs3270_mutex);

static void
fs3270_wake_up(struct raw3270_request *rq, void *data)
{
Expand Down Expand Up @@ -328,7 +330,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (!fp)
return -ENODEV;
rc = 0;
lock_kernel();
mutex_lock(&fs3270_mutex);
switch (cmd) {
case TUBICMD:
fp->read_command = arg;
Expand All @@ -354,7 +356,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
rc = -EFAULT;
break;
}
unlock_kernel();
mutex_unlock(&fs3270_mutex);
return rc;
}

Expand Down Expand Up @@ -437,7 +439,7 @@ fs3270_open(struct inode *inode, struct file *filp)
minor = tty->index + RAW3270_FIRSTMINOR;
tty_kref_put(tty);
}
lock_kernel();
mutex_lock(&fs3270_mutex);
/* Check if some other program is already using fullscreen mode. */
fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor);
if (!IS_ERR(fp)) {
Expand Down Expand Up @@ -478,7 +480,7 @@ fs3270_open(struct inode *inode, struct file *filp)
}
filp->private_data = fp;
out:
unlock_kernel();
mutex_unlock(&fs3270_mutex);
return rc;
}

Expand Down

0 comments on commit 2ba5d88

Please sign in to comment.