diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev_compat.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h index 428664a0b..c8a8e856d 100644 --- a/include/linux/blkdev_compat.h +++ b/include/linux/blkdev_compat.h @@ -598,16 +598,26 @@ blk_queue_discard_granularity(struct request_queue *q, unsigned int dg) */ #define VDEV_HOLDER ((void *)0x2401de7) -#ifndef HAVE_GENERIC_IO_ACCT static inline void -generic_start_io_acct(int rw, unsigned long sectors, struct hd_struct *part) +blk_generic_start_io_acct(struct request_queue *q, int rw, + unsigned long sectors, struct hd_struct *part) { +#if defined(HAVE_GENERIC_IO_ACCT_3ARG) + generic_start_io_acct(rw, sectors, part); +#elif defined(HAVE_GENERIC_IO_ACCT_4ARG) + generic_start_io_acct(q, rw, sectors, part); +#endif } static inline void -generic_end_io_acct(int rw, struct hd_struct *part, unsigned long start_time) +blk_generic_end_io_acct(struct request_queue *q, int rw, + struct hd_struct *part, unsigned long start_time) { -} +#if defined(HAVE_GENERIC_IO_ACCT_3ARG) + generic_end_io_acct(rw, part, start_time); +#elif defined(HAVE_GENERIC_IO_ACCT_4ARG) + generic_end_io_acct(q, rw, part, start_time); #endif +} #endif /* _ZFS_BLKDEV_H */ |