diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-15 12:01:56 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 14:05:49 -0600 |
commit | 04f4ac9d1bb8a9103609ce8e927f8e98826ce339 (patch) | |
tree | cb9a6b4c46a0a5a8557fb0c6bbf5673438686216 /drivers | |
parent | 16750c2f32e3fd879fce787a13900f11633ef9af (diff) | |
download | op-kernel-dev-04f4ac9d1bb8a9103609ce8e927f8e98826ce339.zip op-kernel-dev-04f4ac9d1bb8a9103609ce8e927f8e98826ce339.tar.gz |
ide-tape: cdev lock_kernel() pushdown
->release() already has explicit lock_kernel() calls...
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-tape.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 1e1f263..a3d2283 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -2421,9 +2421,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp) if (i >= MAX_HWIFS * MAX_DRIVES) return -ENXIO; + lock_kernel(); tape = ide_tape_chrdev_get(i); - if (!tape) + if (!tape) { + unlock_kernel(); return -ENXIO; + } debug_log(DBG_CHRDEV, "Enter %s\n", __func__); @@ -2482,10 +2485,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp) } } } + unlock_kernel(); return 0; out_put_tape: ide_tape_put(tape); + unlock_kernel(); return retval; } |