mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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:
committed by
Brian Behlendorf
parent
168d056cf8
commit
a1d9543a39
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user