diff options
author | Giuseppe Di Natale <[email protected]> | 2018-03-05 12:44:35 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-03-05 12:44:35 -0800 |
commit | dd3e1e3083e6b80ac7cc4dabfbf9b5036b7a889d (patch) | |
tree | 8f0b49f470faf6fb9bc60440edbe3f4d7cfd5380 /include | |
parent | 80d52c3919b8cbf1cf21be07037335a22922440f (diff) |
Linux 4.16 compat: get_disk_and_module()
As of https://github.com/torvalds/linux/commit/fb6d47a, get_disk()
is now get_disk_and_module(). Add a configure check to determine
if we need to use get_disk_and_module().
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Giuseppe Di Natale <[email protected]>
Closes #7264
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev_compat.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h index c8a8e856d..4406493e4 100644 --- a/include/linux/blkdev_compat.h +++ b/include/linux/blkdev_compat.h @@ -139,6 +139,14 @@ blk_queue_set_read_ahead(struct request_queue *q, unsigned long ra_pages) #endif } +#ifndef HAVE_GET_DISK_AND_MODULE +static inline struct kobject * +get_disk_and_module(struct gendisk *disk) +{ + return (get_disk(disk)); +} +#endif + #ifndef HAVE_GET_DISK_RO static inline int get_disk_ro(struct gendisk *disk) |