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 <chris@onthe.net.au>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1494
This commit is contained in:
Chris Dunlop
2013-06-03 16:58:52 +10:00
committed by Brian Behlendorf
parent 168d056cf8
commit a1d9543a39
4 changed files with 37 additions and 2 deletions
+6
View File
@@ -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