mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Illumos 6495 - Fix mutex leak in dmu_objset_find_dp
6495 Fix mutex leak in dmu_objset_find_dp Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Albert Lee <trisk@omniti.com> References: https://www.illumos.org/issues/6495 https://github.com/illumos/illumos-gate/commit/2bad225 Ported-by: Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
This commit is contained in:
parent
b6fcb792ca
commit
e56766360b
@ -1785,6 +1785,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
|
||||
* thread suffices. For now, stay single threaded.
|
||||
*/
|
||||
dmu_objset_find_dp_impl(dcp);
|
||||
mutex_destroy(&err_lock);
|
||||
|
||||
return (error);
|
||||
}
|
||||
@ -1796,6 +1797,8 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint64_t ddobj,
|
||||
INT_MAX, 0);
|
||||
if (tq == NULL) {
|
||||
kmem_free(dcp, sizeof (*dcp));
|
||||
mutex_destroy(&err_lock);
|
||||
|
||||
return (SET_ERROR(ENOMEM));
|
||||
}
|
||||
dcp->dc_tq = tq;
|
||||
|
Loading…
Reference in New Issue
Block a user