diff --git a/fs/aio/aio_read.c b/fs/aio/aio_read.c index c020c4ced6..1048954364 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 (aioc->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 30062509e2..f05e357c33 100644 --- a/fs/aio/aio_write.c +++ b/fs/aio/aio_write.c @@ -129,7 +129,7 @@ static void aio_write_worker(FAR void *arg) aiocbp = aioc_decant(aioc); #if defined(AIO_HAVE_FILEP) && defined(AIO_HAVE_PSOCK) - if (aioc->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 50b2f9d434..54f5dcd3d6 100644 --- a/fs/aio/aioc_contain.c +++ b/fs/aio/aioc_contain.c @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -106,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 (aioc->fildes >= CONFIG_NFILE_DESCRIPTORS) + if (aiocbp->aio_fildes >= CONFIG_NFILE_DESCRIPTORS) #endif #ifdef AIO_HAVE_FILEP {