aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorChris Dunlop <[email protected]>2013-06-03 16:58:52 +1000
committerBrian Behlendorf <[email protected]>2013-07-08 15:41:57 -0700
commita1d9543a39942be56879ca9338078afc77c25cea (patch)
tree61e93dbaf3b3911ba6ab21fe3760870f788ce39a /module
parent168d056cf8ed073e17f008b9109ad3d37e63f172 (diff)
3.10 API change: block_device_operations->release() returns void
Linux kernel commit torvalds/linux@db2a144 changed the return type of block_device_operations->release() to void. Detect the expected prototype and defined our callout accordingly. Signed-off-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1494
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zvol.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index e35c91bc1..b51615637 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -1024,7 +1024,11 @@ out_mutex:
return (error);
}
+#ifdef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
+static void
+#else
static int
+#endif
zvol_release(struct gendisk *disk, fmode_t mode)
{
zvol_state_t *zv = disk->private_data;
@@ -1044,7 +1048,9 @@ zvol_release(struct gendisk *disk, fmode_t mode)
if (drop_mutex)
mutex_exit(&zvol_state_lock);
+#ifndef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
return (0);
+#endif
}
static int