[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>
This commit is contained in:
parent
7a8e0c8d9a
commit
2b3d8c9e06
1 changed files with 1 additions and 1 deletions
|
@ -486,7 +486,7 @@ static ssize_t diag14_read(struct file *file, char __user *ubuf, size_t count,
|
|||
}
|
||||
if (rc)
|
||||
goto fail;
|
||||
if (reclen)
|
||||
if (reclen && (copied == 0) && (*offs < PAGE_SIZE))
|
||||
*((u16 *) &buf[FILE_RECLEN_OFFSET]) = reclen;
|
||||
len = min(count - copied, PAGE_SIZE - res);
|
||||
if (copy_to_user(ubuf + copied, buf + res, len)) {
|
||||
|
|
Loading…
Reference in a new issue