projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16750c2
)
ide-tape: cdev lock_kernel() pushdown
author
Jonathan Corbet
<corbet@lwn.net>
Thu, 15 May 2008 18:01:56 +0000
(12:01 -0600)
committer
Jonathan 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
patch
|
blob
|
history
diff --git
a/drivers/ide/ide-tape.c
b/drivers/ide/ide-tape.c
index 1e1f26331a24dd2c4aa3bc0028c216cd6f1c2c40..a3d228302d2019ece45d2b4253cffafab226dd90 100644
(file)
--- 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;
}