From: Jens Axboe Date: Thu, 15 Mar 2007 10:35:33 +0000 (+0100) Subject: blockdev_invalidate_cache(): return -1 for error X-Git-Tag: fio-1.15~90 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a16211bb932067978f74606eb5d3f92e5227eee2 blockdev_invalidate_cache(): return -1 for error This follows the normal system calls, and makes fio pickup errno appropriately. Signed-off-by: Jens Axboe --- diff --git a/os-linux.h b/os-linux.h index 84919539..d3b2e931 100644 --- a/os-linux.h +++ b/os-linux.h @@ -124,10 +124,7 @@ enum { 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)