Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dmu_objset: release bonus buffer in failure path
Reported by kmemleak during testing of a new patch: ``` unreferenced object 0xffff9f1c12e38800 (size 1024): comm "z_upgrade", pid 17842, jiffies 4296870904 (age 8746.268s) backtrace: kmemleak_alloc+0x7a/0x100 __kmalloc_node+0x26c/0x510 range_tree_create+0x39/0xa0 [zfs] dmu_zfetch_init+0x73/0xe0 [zfs] dnode_create+0x12c/0x3b0 [zfs] dnode_hold_impl+0x1096/0x1130 [zfs] dnode_hold+0x23/0x30 [zfs] dmu_bonus_hold_impl+0x6b/0x370 [zfs] dmu_bonus_hold+0x1e/0x30 [zfs] dmu_objset_space_upgrade+0x114/0x310 [zfs] dmu_objset_userobjspace_upgrade_cb+0xd8/0x150 [zfs] dmu_objset_upgrade_task_cb+0x136/0x1e0 [zfs] kthread+0x119/0x150 ``` Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Signed-off-by: Gvozden Neskovic <neskovic@gmail.com> Closes openzfs#6575
- Loading branch information