diff options
author | avg <avg@FreeBSD.org> | 2014-02-17 18:00:24 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2014-02-17 18:00:24 +0000 |
commit | c448604d7f2d9873cc7634751fa6f6476230489e (patch) | |
tree | ef29ea2d7adc2568a14572309c1a36e9b640897d /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | |
parent | f48946d7a0dd1437251452a2435245a0b6ba1d20 (diff) | |
download | FreeBSD-src-c448604d7f2d9873cc7634751fa6f6476230489e.zip FreeBSD-src-c448604d7f2d9873cc7634751fa6f6476230489e.tar.gz |
MFC r260704,260717: zfs: getnewvnode_reserve must be called outside of a
zfs transaction
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c index a3a1338..9ac00ed 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c @@ -624,6 +624,8 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz, zp = kmem_cache_alloc(znode_cache, KM_SLEEP); + KASSERT(curthread->td_vp_reserv > 0, + ("zfs_znode_alloc: getnewvnode without any vnodes reserved")); error = getnewvnode("zfs", zfsvfs->z_parent->z_vfs, &zfs_vnodeops, &vp); if (error != 0) { kmem_cache_free(znode_cache, zp); @@ -832,7 +834,6 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr, } } - getnewvnode_reserve(1); ZFS_OBJ_HOLD_ENTER(zfsvfs, obj); VERIFY(0 == sa_buf_hold(zfsvfs->z_os, obj, NULL, &db)); @@ -1019,7 +1020,6 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr, KASSERT(err == 0, ("insmntque() failed: error %d", err)); } ZFS_OBJ_HOLD_EXIT(zfsvfs, obj); - getnewvnode_drop_reserve(); } /* |