summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2018-03-05 12:44:35 -0800
committerBrian Behlendorf <[email protected]>2018-03-05 12:44:35 -0800
commitdd3e1e3083e6b80ac7cc4dabfbf9b5036b7a889d (patch)
tree8f0b49f470faf6fb9bc60440edbe3f4d7cfd5380 /module
parent80d52c3919b8cbf1cf21be07037335a22922440f (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 'module')
-rw-r--r--module/zfs/zvol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index b0622c2ba..d37e9e70a 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -1589,7 +1589,7 @@ zvol_probe(dev_t dev, int *part, void *arg)
struct kobject *kobj;
zv = zvol_find_by_dev(dev);
- kobj = zv ? get_disk(zv->zv_disk) : NULL;
+ kobj = zv ? get_disk_and_module(zv->zv_disk) : NULL;
ASSERT(zv == NULL || MUTEX_HELD(&zv->zv_state_lock));
if (zv)
mutex_exit(&zv->zv_state_lock);