diff --git a/fs/aio/aio_read.c b/fs/aio/aio_read.c index fd05edbc6b..81ee4e5926 100644 --- a/fs/aio/aio_read.c +++ b/fs/aio/aio_read.c @@ -111,7 +111,7 @@ static void aio_read_worker(FAR void *arg) aiocbp = aioc_decant(aioc); #if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK) - if (aiocbp->aio_fildes >= CONFIG_NFILE_DESCRIPTORS) + if (aiocbp->aio_fildes < CONFIG_NFILE_DESCRIPTORS) #endif #ifdef AIO_HAVE_FILEP { diff --git a/fs/aio/aio_write.c b/fs/aio/aio_write.c index 6b89038950..70f40ca598 100644 --- a/fs/aio/aio_write.c +++ b/fs/aio/aio_write.c @@ -131,7 +131,7 @@ static void aio_write_worker(FAR void *arg) aiocbp = aioc_decant(aioc); #if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK) - if (aiocbp->aio_fildes >= CONFIG_NFILE_DESCRIPTORS) + if (aiocbp->aio_fildes < CONFIG_NFILE_DESCRIPTORS) #endif #ifdef AIO_HAVE_FILEP { diff --git a/fs/aio/aioc_contain.c b/fs/aio/aioc_contain.c index 54f5dcd3d6..207ae74681 100644 --- a/fs/aio/aioc_contain.c +++ b/fs/aio/aioc_contain.c @@ -107,7 +107,7 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp) #endif #if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK) - if (aiocbp->aio_fildes >= CONFIG_NFILE_DESCRIPTORS) + if (aiocbp->aio_fildes < CONFIG_NFILE_DESCRIPTORS) #endif #ifdef AIO_HAVE_FILEP { @@ -151,7 +151,7 @@ FAR struct aio_container_s *aio_contain(FAR struct aiocb *aiocbp) memset(aioc, 0, sizeof(struct aio_container_s)); aioc->aioc_aiocbp = aiocbp; - aioc->u.aioc_filep = u.ptr; + aioc->u.ptr = u.ptr; aioc->aioc_pid = getpid(); #ifdef CONFIG_PRIORITY_INHERITANCE