From: Jens Axboe Date: Sun, 8 Apr 2018 21:47:55 +0000 (-0600) Subject: filesetup: fix dead assignment of 'ret' X-Git-Tag: fio-3.6~11 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1975b5347cb313379792b022bf7233ba47795386;p=fio.git filesetup: fix dead assignment of 'ret' Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index b246e0f9..75694bd8 100644 --- a/filesetup.c +++ b/filesetup.c @@ -490,7 +490,6 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f, } else if (td_ioengine_flagged(td, FIO_DISKLESSIO)) { dprint(FD_IO, "invalidate not supported by ioengine %s\n", td->io_ops->name); - ret = 0; } else if (f->filetype == FIO_TYPE_FILE) { dprint(FD_IO, "declare unneeded cache %s: %llu/%llu\n", f->file_name, off, len); @@ -517,14 +516,12 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f, log_err("fio: only root may flush block " "devices. Cache flush bypassed!\n"); } - ret = 0; } if (ret < 0) errval = errno; } else if (f->filetype == FIO_TYPE_CHAR || f->filetype == FIO_TYPE_PIPE) { dprint(FD_IO, "invalidate not supported %s\n", f->file_name); - ret = 0; } /*