Rename fls() to __fls()
[fio.git] / engines / posixaio.c
index 95141750a26466d8e8f4c6894e3716fa7bac3a4d..4aa1842add790f4330502abd509ce87152bfe99e 100644 (file)
@@ -83,7 +83,7 @@ static int fio_posixaio_getevents(struct thread_data *td, unsigned int min,
 {
        struct posixaio_data *pd = td->io_ops->data;
        struct aiocb *suspend_list[SUSPEND_ENTRIES];
-       struct list_head *entry;
+       struct flist_head *entry;
        struct timespec start;
        int have_timeout = 0;
        int suspend_entries = 0;
@@ -93,10 +93,10 @@ static int fio_posixaio_getevents(struct thread_data *td, unsigned int min,
                have_timeout = 1;
 
        r = 0;
-       suspend_list[0] = NULL;
+       memset(suspend_list, 0, sizeof(*suspend_list));
 restart:
-       list_for_each(entry, &td->io_u_busylist) {
-               struct io_u *io_u = list_entry(entry, struct io_u, list);
+       flist_for_each(entry, &td->io_u_busylist) {
+               struct io_u *io_u = flist_entry(entry, struct io_u, list);
                int err;
 
                if (io_u->seen)
@@ -184,7 +184,6 @@ static void fio_posixaio_cleanup(struct thread_data *td)
        if (pd) {
                free(pd->aio_events);
                free(pd);
-               td->io_ops->data = NULL;
        }
 }