From: Frank Munzert Date: Fri, 27 Jul 2007 10:29:17 +0000 (+0200) Subject: [S390] vmur: fix diag14_read. X-Git-Tag: v2.6.23-rc2~178^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2b3d8c9e06392d5539aa5d652f3a3c385fd19333;p=linux-2.6-omap-h63xx.git [S390] vmur: fix diag14_read. Record length of spool file must be only stored in 1st SPLINK record Signed-off-by: Frank Munzert Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index e90b0f84619..161867cebd8 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)) {