summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-12-09 07:57:17 +0000
committerRoland McGrath <roland@gnu.org>1994-12-09 07:57:17 +0000
commitd6efb23d9ff064a92970bbd1bb74024925e3a6e5 (patch)
tree96aa679fced4c30159a57286775d407ee2349855
parent19bea8ef2b2458d2c1d29d5c8a1c8ee77d05b649 (diff)
(diskfs_S_io_read): Don't check for MAXREAD<0.
-rw-r--r--libdiskfs/io-read.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libdiskfs/io-read.c b/libdiskfs/io-read.c
index 397349df..041cbc29 100644
--- a/libdiskfs/io-read.c
+++ b/libdiskfs/io-read.c
@@ -39,8 +39,6 @@ diskfs_S_io_read (struct protid *cred,
np = cred->po->np;
if (!(cred->po->openstat & O_READ))
return EBADF;
- if (maxread < 0)
- return EINVAL;
mutex_lock (&np->lock);
@@ -50,11 +48,7 @@ diskfs_S_io_read (struct protid *cred,
off = cred->po->filepointer;
if (off + maxread > np->dn_stat.st_size)
- {
- maxread = np->dn_stat.st_size - off;
- if (maxread < 0)
- maxread = 0;
- }
+ maxread = np->dn_stat.st_size - off;
if (maxread > *datalen)
{