Skip to content

Commit

Permalink
Remove the lock_kernel() call from chrdev_open()
Browse files Browse the repository at this point in the history
All in-kernel char device open() functions now either have their own
lock_kernel() calls or clearly do not need one.

Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent a30427d commit 9514dff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/char_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,8 @@ static int chrdev_open(struct inode *inode, struct file *filp)
cdev_put(p);
return -ENXIO;
}
if (filp->f_op->open) {
lock_kernel();
if (filp->f_op->open)
ret = filp->f_op->open(inode,filp);
unlock_kernel();
}
if (ret)
cdev_put(p);
return ret;
Expand Down

0 comments on commit 9514dff

Please sign in to comment.