diff options
author | Rich Ercolani <[email protected]> | 2022-01-14 05:08:33 -0500 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-02-04 08:33:52 -0800 |
commit | c31c1146b6d795f305f7e09a3de13bcdd66f2ac4 (patch) | |
tree | 729258283564726185e0438ae92361d7bdf33d06 /module | |
parent | b3e08539510a3372fe55369a41547021f3d55c86 (diff) |
Linux 5.16 compat: Added add_disk check for return
add_disk went from void to must-check int return.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Coleman Kane <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes #12975
Diffstat (limited to 'module')
-rw-r--r-- | module/os/linux/zfs/zvol_os.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index 69479b3f7..7a979eb91 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -1110,7 +1110,11 @@ out_doi: rw_enter(&zvol_state_lock, RW_WRITER); zvol_insert(zv); rw_exit(&zvol_state_lock); +#ifdef HAVE_ADD_DISK_RET + error = add_disk(zv->zv_zso->zvo_disk); +#else add_disk(zv->zv_zso->zvo_disk); +#endif } else { ida_simple_remove(&zvol_ida, idx); } |