blockdev_invalidate_cache(): return -1 for error
authorJens Axboe <jens.axboe@oracle.com>
Thu, 15 Mar 2007 10:35:33 +0000 (11:35 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 15 Mar 2007 10:35:33 +0000 (11:35 +0100)
This follows the normal system calls, and makes fio pickup errno
appropriately.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
os-linux.h

index 8491953..d3b2e93 100644 (file)
@@ -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)