Date: Wed, 13 Jul 2016 09:50:17 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302741 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201607130950.u6D9oHc8096385@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Wed Jul 13 09:50:17 2016 New Revision: 302741 URL: https://svnweb.freebsd.org/changeset/base/302741 Log: MFC r301273: zfs_root: fix a potential root vnode reference leak Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:50:07 2016 (r302740) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jul 13 09:50:17 2016 (r302741) @@ -1826,11 +1826,13 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t ZFS_EXIT(zfsvfs); - if (error == 0) + if (error == 0) { error = vn_lock(*vpp, flags); - if (error != 0) - *vpp = NULL; - + if (error != 0) { + VN_RELE(*vpp); + *vpp = NULL; + } + } return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607130950.u6D9oHc8096385>