提交 04f4ac9d 编写于 作者: J Jonathan Corbet

ide-tape: cdev lock_kernel() pushdown

->release() already has explicit lock_kernel() calls...
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 16750c2f
...@@ -2421,9 +2421,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp) ...@@ -2421,9 +2421,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp)
if (i >= MAX_HWIFS * MAX_DRIVES) if (i >= MAX_HWIFS * MAX_DRIVES)
return -ENXIO; return -ENXIO;
lock_kernel();
tape = ide_tape_chrdev_get(i); tape = ide_tape_chrdev_get(i);
if (!tape) if (!tape) {
unlock_kernel();
return -ENXIO; return -ENXIO;
}
debug_log(DBG_CHRDEV, "Enter %s\n", __func__); debug_log(DBG_CHRDEV, "Enter %s\n", __func__);
...@@ -2482,10 +2485,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp) ...@@ -2482,10 +2485,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp)
} }
} }
} }
unlock_kernel();
return 0; return 0;
out_put_tape: out_put_tape:
ide_tape_put(tape); ide_tape_put(tape);
unlock_kernel();
return retval; return retval;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册