mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-04-17 08:54:52 +03:00
zvol_check_volblocksize: fix spa ref leak
Reviewed-by: Allan Jude <allan@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Fedor Uporov <fuporov.vstack@gmail.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: Railway Corporation Closes #17596
This commit is contained in:
parent
3e671f2353
commit
e6eb03a991
@ -450,8 +450,10 @@ zvol_check_volblocksize(const char *name, uint64_t volblocksize)
|
|||||||
* We don't allow setting the property above 1MB,
|
* We don't allow setting the property above 1MB,
|
||||||
* unless the tunable has been changed.
|
* unless the tunable has been changed.
|
||||||
*/
|
*/
|
||||||
if (volblocksize > zfs_max_recordsize)
|
if (volblocksize > zfs_max_recordsize) {
|
||||||
|
spa_close(spa, FTAG);
|
||||||
return (SET_ERROR(EDOM));
|
return (SET_ERROR(EDOM));
|
||||||
|
}
|
||||||
|
|
||||||
spa_close(spa, FTAG);
|
spa_close(spa, FTAG);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user