From: Jens Axboe Date: Thu, 3 Dec 2015 22:08:08 +0000 (-0700) Subject: posix_fadvise() returns positive error values X-Git-Tag: fio-2.2.13~51 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0b139881150f7179688243c224a07b57eedbdfa0;p=fio.git posix_fadvise() returns positive error values Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index 75136ff3..76667547 100644 --- a/filesetup.c +++ b/filesetup.c @@ -414,7 +414,7 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f, errval = ret; } else if (f->filetype == FIO_TYPE_FILE) { ret = posix_fadvise(f->fd, off, len, POSIX_FADV_DONTNEED); - if (ret < 0) + if (ret) errval = ret; } else if (f->filetype == FIO_TYPE_BD) { int retry_count = 0;