mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <ezomori.nozomu@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #7264
This commit is contained in:
committed by
Tony Hutter
parent
6dc40e2ada
commit
8d7f17798d
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user