diff --git a/fs/nfs/nfs_vfsops.c b/fs/nfs/nfs_vfsops.c index 01d7adea474..0a246aa0a86 100644 --- a/fs/nfs/nfs_vfsops.c +++ b/fs/nfs/nfs_vfsops.c @@ -834,7 +834,7 @@ static ssize_t nfs_read(FAR struct file *filep, char *buffer, size_t buflen) { /* Make sure that the attempted read size does not exceed the RPC maximum */ - readsize = buflen; + readsize = buflen - bytesread; if (readsize > nmp->nm_rsize) { readsize = nmp->nm_rsize;