[PATCH] drivers/scsi/ch.c: Remove BKL in ch_open

From: John Kacur
Date: Sun Oct 11 2009 - 07:06:54 EST


Everything in ch_open is covered by a spin_lock, so the lock_kernel is redundant
Remove it.

Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
---
drivers/scsi/ch.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index fe11c1d..4ba8b67 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -579,19 +579,16 @@ ch_open(struct inode *inode, struct file *file)
scsi_changer *ch;
int minor = iminor(inode);

- lock_kernel();
spin_lock(&ch_index_lock);
ch = idr_find(&ch_index_idr, minor);

if (NULL == ch || scsi_device_get(ch->device)) {
spin_unlock(&ch_index_lock);
- unlock_kernel();
return -ENXIO;
}
+ file->private_data = ch;
spin_unlock(&ch_index_lock);

- file->private_data = ch;
- unlock_kernel();
return 0;
}

--
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/