Use clear_error() instead of clearing the error manually
authorJens Axboe <jens.axboe@oracle.com>
Tue, 27 Mar 2007 17:50:11 +0000 (19:50 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 27 Mar 2007 17:50:11 +0000 (19:50 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c

index bf28b41ad161c489390382219602e026b8c6b9b2..40a16638f9ea798a9e4b5c0c97c37ee5e691da15 100644 (file)
@@ -276,10 +276,9 @@ static void get_file_sizes(struct thread_data *td)
        unsigned int i;
 
        for_each_file(td, f, i) {
-               if (td->io_ops->open_file(td, f)) {
-                       td->error = 0;
-                       memset(td->verror, 0, sizeof(td->verror));
-               } else
+               if (td->io_ops->open_file(td, f))
+                       clear_error(td);
+               else
                        td->io_ops->close_file(td, f);
        }
 }