MFV r294800: 6385 Fix unlocking order in zfs_zget

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@eaef6a96de
This commit is contained in:
mav 2016-01-26 12:44:49 +00:00
parent 9b06fb3e33
commit 39cc035b09

View File

@ -1175,13 +1175,13 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_num, znode_t **zpp)
*zpp = zp; *zpp = zp;
err = 0; err = 0;
} }
sa_buf_rele(db, NULL);
/* Don't let the vnode disappear after ZFS_OBJ_HOLD_EXIT. */ /* Don't let the vnode disappear after ZFS_OBJ_HOLD_EXIT. */
if (err == 0) if (err == 0)
VN_HOLD(vp); VN_HOLD(vp);
mutex_exit(&zp->z_lock); mutex_exit(&zp->z_lock);
sa_buf_rele(db, NULL);
ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
if (err == 0) { if (err == 0) {