[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:
Frank Munzert 2007-07-27 12:29:17 +02:00 committed by Martin Schwidefsky
parent 7a8e0c8d9a
commit 2b3d8c9e06

View file

@ -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)) {