blockdev_invalidate_cache(): return -1 for error
This follows the normal system calls, and makes fio pickup errno
appropriately.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/os-linux.h b/os-linux.h
index 8491953..d3b2e93 100644
--- a/os-linux.h
+++ b/os-linux.h
@@ -124,10 +124,7 @@
static inline int blockdev_invalidate_cache(int fd)
{
- if (!ioctl(fd, BLKFLSBUF))
- return 0;
-
- return errno;
+ return ioctl(fd, BLKFLSBUF);
}
static inline int blockdev_size(int fd, unsigned long long *bytes)