No need to check for type before doing fsync()
authorJens Axboe <jens.axboe@oracle.com>
Tue, 17 Apr 2007 07:05:10 +0000 (09:05 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 17 Apr 2007 07:05:10 +0000 (09:05 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c

index 85141dc3725a26b870fe8afe83876199e2142163..f0c42e896de1afc336888f949045b8b493087c61 100644 (file)
@@ -554,8 +554,7 @@ void put_file(struct thread_data *td, struct fio_file *f)
        if (--f->references)
                return;
 
-       if (should_fsync(td) && td->o.fsync_on_close &&
-           (f->filetype == FIO_TYPE_FILE || f->filetype == FIO_TYPE_BD))
+       if (should_fsync(td) && td->o.fsync_on_close)
                fsync(f->fd);
 
        if (td->io_ops->close_file)