aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/char_dev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c
index a54d69369b2f..3cb7cda3d780 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -394,11 +394,8 @@ static int chrdev_open(struct inode *inode, struct file *filp)
394 cdev_put(p); 394 cdev_put(p);
395 return -ENXIO; 395 return -ENXIO;
396 } 396 }
397 if (filp->f_op->open) { 397 if (filp->f_op->open)
398 lock_kernel();
399 ret = filp->f_op->open(inode,filp); 398 ret = filp->f_op->open(inode,filp);
400 unlock_kernel();
401 }
402 if (ret) 399 if (ret)
403 cdev_put(p); 400 cdev_put(p);
404 return ret; 401 return ret;