fix re-open failure issue when using gluster ioengine
[fio.git] / engines / glusterfs.c
index a64c687f8264db9c9e470a1779cd18840ce78902..52df9e8a0608f2d73b89a70c962a52cfe79abd63 100644 (file)
@@ -77,16 +77,12 @@ int fio_gf_setup(struct thread_data *td)
        }
        dprint(FD_FILE, "fio setup %p\n", g->fs);
        td->io_ops->data = g;
+       return 0;
 cleanup:
-       if (r) {
-               if (g) {
-                       if (g->fs) {
-                               glfs_fini(g->fs);
-                       }
-                       free(g);
-                       td->io_ops->data = NULL;
-               }
-       }
+       if (g->fs)
+               glfs_fini(g->fs);
+       free(g);
+       td->io_ops->data = NULL;
        return r;
 }
 
@@ -264,7 +260,7 @@ int fio_gf_open_file(struct thread_data *td, struct fio_file *f)
        dprint(FD_FILE, "fio %p created %s\n", g->fs, f->file_name);
        f->fd = -1;
        f->shadow_fd = -1;
-
+       td->o.open_files ++;
        return ret;
 }