summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorFrank Munzert <munzert@de.ibm.com>2007-07-27 12:29:17 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-07-27 12:29:19 +0200
commit2b3d8c9e06392d5539aa5d652f3a3c385fd19333 (patch)
treefba2551e81571153907deedf4dc963fe839578e2 /drivers/s390
parent[S390] Wire up sys_fallocate. (diff)
downloadlinux-2b3d8c9e06392d5539aa5d652f3a3c385fd19333.tar.xz
linux-2b3d8c9e06392d5539aa5d652f3a3c385fd19333.zip
[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.c2
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,
}
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)) {