summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-01-05 22:06:31 +0000
committerRoland McGrath <roland@gnu.org>1996-01-05 22:06:31 +0000
commit5d90d2c13c0f40dfc23601efe8633493d9a8fb78 (patch)
treea8669e0cf9b22e7bd53a0a89dfe314e08c729bb1
parent34ddbb5563b4d10238fff98938e81a1e37dbec1c (diff)
Return errors regardless of *DATALEN--reads are all or nothing.
-rw-r--r--libdiskfs/io-read.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libdiskfs/io-read.c b/libdiskfs/io-read.c
index fc6faf88..96a480cd 100644
--- a/libdiskfs/io-read.c
+++ b/libdiskfs/io-read.c
@@ -63,14 +63,8 @@ diskfs_S_io_read (struct protid *cred,
*datalen = maxread;
if (maxread)
- {
- err = _diskfs_rdwr_internal (np, buf, off, datalen, 0,
- cred->po->openstat & O_NOATIME);
- if (*datalen)
- /* If we read any, we can just return a short read count
- with no error; the next read will hit the error again. */
- err = 0;
- }
+ err = _diskfs_rdwr_internal (np, buf, off, datalen, 0,
+ cred->po->openstat & O_NOATIME);
else
err = 0;
if (diskfs_synchronous)