]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide-tape: cdev lock_kernel() pushdown
authorJonathan Corbet <corbet@lwn.net>
Thu, 15 May 2008 18:01:56 +0000 (12:01 -0600)
committerJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 20:05:49 +0000 (14:05 -0600)
->release() already has explicit lock_kernel() calls...

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
drivers/ide/ide-tape.c

index 1e1f26331a24dd2c4aa3bc0028c216cd6f1c2c40..a3d228302d2019ece45d2b4253cffafab226dd90 100644 (file)
@@ -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;
 }