diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-15 10:01:17 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 14:03:43 -0600 |
commit | 764a4a8e54cdd6efc5928f876aa9e35778f22377 (patch) | |
tree | 76300e77269d5c3122b3e52d925baea8a4e84253 /drivers/s390/char/vmlogrdr.c | |
parent | 51a776fa7a7997e726d4a478eda0854c6f9143bd (diff) |
drivers/s390: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/s390/char/vmlogrdr.c')
-rw-r--r-- | drivers/s390/char/vmlogrdr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index e8487347e4d..d101328a298 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c @@ -25,6 +25,7 @@ #include <linux/kmod.h> #include <linux/cdev.h> #include <linux/device.h> +#include <linux/smp_lock.h> #include <linux/string.h> @@ -319,9 +320,11 @@ static int vmlogrdr_open (struct inode *inode, struct file *filp) return -ENOSYS; /* Besure this device hasn't already been opened */ + lock_kernel(); spin_lock_bh(&logptr->priv_lock); if (logptr->dev_in_use) { spin_unlock_bh(&logptr->priv_lock); + unlock_kernel(); return -EBUSY; } logptr->dev_in_use = 1; @@ -365,7 +368,9 @@ static int vmlogrdr_open (struct inode *inode, struct file *filp) || (logptr->iucv_path_severed)); if (logptr->iucv_path_severed) goto out_record; - return nonseekable_open(inode, filp); + ret = nonseekable_open(inode, filp); + unlock_kernel(); + return ret; out_record: if (logptr->autorecording) @@ -375,6 +380,7 @@ out_path: logptr->path = NULL; out_dev: logptr->dev_in_use = 0; + unlock_kernel(); return -EIO; } |