Put the ->real_file_size handling into fio
[fio.git] / ioengines.c
index 3cfa773ac07ea2e79d6f17c6ef38ffc360947035..b9c6d71400ec672b0288e0abe17f6cff345f9941 100644 (file)
@@ -17,7 +17,6 @@
 #include <assert.h>
 
 #include "fio.h"
-#include "os.h"
 
 static LIST_HEAD(engine_list);
 
@@ -306,7 +305,8 @@ done:
        get_file(f);
        return 0;
 err:
-       td->io_ops->close_file(td, f);
+       if (td->io_ops->close_file)
+               td->io_ops->close_file(td, f);
        return 1;
 }
 
@@ -319,4 +319,3 @@ void td_io_close_file(struct thread_data *td, struct fio_file *f)
 
        put_file(td, f);
 }
-