diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-15 23:12:58 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-15 23:12:58 +0200 |
commit | 1e09481365ce248dbb4eb06dad70129bb5807037 (patch) | |
tree | c0cff5bef95c8b5e7486f144718ade9a06c284dc /drivers/s390/char/vmur.c | |
parent | 3e2f69fdd1b00166e7d589bce56b2d36a9e74374 (diff) | |
parent | b9d2252c1e44fa83a4e65fdc9eb93db6297c55af (diff) | |
download | blackbird-op-linux-1e09481365ce248dbb4eb06dad70129bb5807037.tar.gz blackbird-op-linux-1e09481365ce248dbb4eb06dad70129bb5807037.zip |
Merge branch 'linus' into core/softlockup
Conflicts:
kernel/softlockup.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/s390/char/vmur.c')
-rw-r--r-- | drivers/s390/char/vmur.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 83ae9a852f00..0a9f1cccbe58 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c @@ -9,6 +9,7 @@ */ #include <linux/cdev.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/cio.h> @@ -277,7 +278,8 @@ static void ur_int_handler(struct ccw_device *cdev, unsigned long intparm, struct urdev *urd; TRACE("ur_int_handler: intparm=0x%lx cstat=%02x dstat=%02x res=%u\n", - intparm, irb->scsw.cstat, irb->scsw.dstat, irb->scsw.count); + intparm, irb->scsw.cmd.cstat, irb->scsw.cmd.dstat, + irb->scsw.cmd.count); if (!intparm) { TRACE("ur_int_handler: unsolicited interrupt\n"); @@ -288,7 +290,7 @@ static void ur_int_handler(struct ccw_device *cdev, unsigned long intparm, /* On special conditions irb is an error pointer */ if (IS_ERR(irb)) urd->io_request_rc = PTR_ERR(irb); - else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) + else if (irb->scsw.cmd.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) urd->io_request_rc = 0; else urd->io_request_rc = -EIO; @@ -668,7 +670,7 @@ static int ur_open(struct inode *inode, struct file *file) if (accmode == O_RDWR) return -EACCES; - + lock_kernel(); /* * We treat the minor number as the devno of the ur device * to find in the driver tree. @@ -676,8 +678,10 @@ static int ur_open(struct inode *inode, struct file *file) devno = MINOR(file->f_dentry->d_inode->i_rdev); urd = urdev_get_from_devno(devno); - if (!urd) - return -ENXIO; + if (!urd) { + rc = -ENXIO; + goto out; + } spin_lock(&urd->open_lock); while (urd->open_flag) { @@ -720,6 +724,7 @@ static int ur_open(struct inode *inode, struct file *file) goto fail_urfile_free; urf->file_reclen = rc; file->private_data = urf; + unlock_kernel(); return 0; fail_urfile_free: @@ -730,6 +735,8 @@ fail_unlock: spin_unlock(&urd->open_lock); fail_put: urdev_put(urd); +out: + unlock_kernel(); return rc; } |