Skip to content

Commit

Permalink
[S390] vmur: fix diag14_read.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frank Munzert authored and Martin Schwidefsky committed Jul 27, 2007
1 parent 7a8e0c8 commit 2b3d8c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/char/vmur.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 2b3d8c9

Please sign in to comment.