diff options
author | Frank Munzert <munzert@de.ibm.com> | 2007-07-27 06:29:17 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-07-27 06:29:19 -0400 |
commit | 2b3d8c9e06392d5539aa5d652f3a3c385fd19333 (patch) | |
tree | fba2551e81571153907deedf4dc963fe839578e2 /drivers/s390 | |
parent | 7a8e0c8d9af43c9dfc62a8b2b9cc0484f48f7da4 (diff) |
[S390] vmur: fix diag14_read.
Record length of spool file must be only stored in 1st SPLINK record
Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/vmur.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index e90b0f846195..161867cebd8c 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
@@ -486,7 +486,7 @@ static ssize_t diag14_read(struct file *file, char __user *ubuf, size_t count, | |||
486 | } | 486 | } |
487 | if (rc) | 487 | if (rc) |
488 | goto fail; | 488 | goto fail; |
489 | if (reclen) | 489 | if (reclen && (copied == 0) && (*offs < PAGE_SIZE)) |
490 | *((u16 *) &buf[FILE_RECLEN_OFFSET]) = reclen; | 490 | *((u16 *) &buf[FILE_RECLEN_OFFSET]) = reclen; |
491 | len = min(count - copied, PAGE_SIZE - res); | 491 | len = min(count - copied, PAGE_SIZE - res); |
492 | if (copy_to_user(ubuf + copied, buf + res, len)) { | 492 | if (copy_to_user(ubuf + copied, buf + res, len)) { |