Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754058AbZCXVPA (ORCPT ); Tue, 24 Mar 2009 17:15:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752846AbZCXVNU (ORCPT ); Tue, 24 Mar 2009 17:13:20 -0400 Received: from yx-out-2324.google.com ([74.125.44.29]:6868 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665AbZCXVNR (ORCPT ); Tue, 24 Mar 2009 17:13:17 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=tuULzX/Px4WfRAsoOyJcL3Ktp7o/cKeDvvDkPzERT82tVNdX+31HKwT6M2yaXGclYF 8hFCmVqXawqRh5RE7xKEoRKeO61Cv8k+nmMaVdGS7TvpuO46VoXnXv4h9BBO7G+8s5MB S3HUj59wgb0HTr4H+RKa4J//Xi9yiqraNaIwc= From: stoyboyker@gmail.com To: linux-kernel@vger.kernel.org Cc: Stoyan Gaydarov , 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 Message-Id: <1237929168-15341-7-git-send-email-stoyboyker@gmail.com> X-Mailer: git-send-email 1.6.2.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1795 Lines: 61 From: Stoyan Gaydarov Signed-off-by: Stoyan Gaydarov --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/