From: stoyboyker@gmail.com
To: linux-kernel@vger.kernel.org
Cc: Stoyan Gaydarov <stoyboyker@gmail.com>,
James.Bottomley@HansenPartnership.com,
linux-scsi@vger.kernel.org
Subject: [PATCH 06/13] [scsi] changed ioctls to unlocked
Date: Tue, 24 Mar 2009 16:12:41 -0500 [thread overview]
Message-ID: <1237929168-15341-7-git-send-email-stoyboyker@gmail.com> (raw)
From: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
---
drivers/scsi/osst.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 0ea78d9..80e7e98 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -4856,9 +4856,10 @@ static int os_scsi_tape_close(struct inode * inode, struct file * filp)
/* The ioctl command */
-static int osst_ioctl(struct inode * inode,struct file * file,
- unsigned int cmd_in, unsigned long arg)
+static long osst_ioctl(struct file * file, unsigned int cmd_in,
+ unsigned long arg)
{
+ lock_kernel();
int i, cmd_nr, cmd_type, blk, retval = 0;
struct st_modedef * STm;
struct st_partstat * STps;
@@ -4867,8 +4868,10 @@ static int osst_ioctl(struct inode * inode,struct file * file,
char * name = tape_name(STp);
void __user * p = (void __user *)arg;
- if (mutex_lock_interruptible(&STp->lock))
+ if (mutex_lock_interruptible(&STp->lock)) {
+ unlock_kernel();
return -ERESTARTSYS;
+ }
#if DEBUG
if (debugging && !STp->in_use) {
@@ -5187,6 +5190,7 @@ out:
mutex_unlock(&STp->lock);
+ unlock_kernel();
return retval;
}
@@ -5542,7 +5546,7 @@ static const struct file_operations osst_fops = {
.owner = THIS_MODULE,
.read = osst_read,
.write = osst_write,
- .ioctl = osst_ioctl,
+ .unlocked_ioctl = osst_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = osst_compat_ioctl,
#endif
--
1.6.2
next reply other threads:[~2009-03-24 21:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-24 21:12 stoyboyker [this message]
2009-03-24 21:24 ` [PATCH 06/13] [scsi] changed ioctls to unlocked James Bottomley
2009-03-24 21:28 ` Stoyan Gaydarov
2009-03-25 4:21 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237929168-15341-7-git-send-email-stoyboyker@gmail.com \
--to=stoyboyker@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox