Date: Fri, 5 Jun 2015 17:07:52 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284038 - vendor-sys/illumos/dist/uts/common/fs/zfs Message-ID: <201506051707.t55H7qip020191@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Jun 5 17:07:51 2015 New Revision: 284038 URL: https://svnweb.freebsd.org/changeset/base/284038 Log: 5870 dmu_recv_end_check() leaks origin_head hold if error happens in drc_force branch Author: Andriy Gapon <avg@freebsd.org> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com> illumos/illumos-gate@beddaa9ce797b9deaafc22b4f156d23f9b45c32d Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:07:13 2015 (r284037) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:07:51 2015 (r284038) @@ -1953,7 +1953,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_dataset_hold_obj(dp, obj, FTAG, &snap); if (error != 0) - return (error); + break; if (snap->ds_dir != origin_head->ds_dir) error = SET_ERROR(EINVAL); if (error == 0) { @@ -1963,7 +1963,11 @@ dmu_recv_end_check(void *arg, dmu_tx_t * obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_dataset_rele(snap, FTAG); if (error != 0) - return (error); + break; + } + if (error != 0) { + dsl_dataset_rele(origin_head, FTAG); + return (error); } } error = dsl_dataset_clone_swap_check_impl(drc->drc_ds,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506051707.t55H7qip020191>