Commit 9514dff918b947ae43b66517dc90d0e05548bd6a

Authored by Jonathan Corbet
1 parent a30427d92d

Remove the lock_kernel() call from chrdev_open()

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 <corbet@lwn.net>

Showing 1 changed file with 1 additions and 4 deletions Side-by-side Diff

... ... @@ -394,11 +394,8 @@
394 394 cdev_put(p);
395 395 return -ENXIO;
396 396 }
397   - if (filp->f_op->open) {
398   - lock_kernel();
  397 + if (filp->f_op->open)
399 398 ret = filp->f_op->open(inode,filp);
400   - unlock_kernel();
401   - }
402 399 if (ret)
403 400 cdev_put(p);
404 401 return ret;