Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2013 14:23:21 +0000 (UTC)
From:      Steven Hartland <smh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r249405 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201304121423.r3CENLsr031635@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: smh
Date: Fri Apr 12 14:23:21 2013
New Revision: 249405
URL: http://svnweb.freebsd.org/changeset/base/249405

Log:
  MFC r241628: zfs: make use of getnewvnode_reserve in zfs_mknode and zfs_zget
  
  Reviewed by:	avg
  Approved by:	avg (co-mentor)

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Fri Apr 12 14:19:44 2013	(r249404)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Fri Apr 12 14:23:21 2013	(r249405)
@@ -855,6 +855,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, d
 		}
 	}
 
+	getnewvnode_reserve(1);
 	ZFS_OBJ_HOLD_ENTER(zfsvfs, obj);
 	VERIFY(0 == sa_buf_hold(zfsvfs->z_os, obj, NULL, &db));
 
@@ -1041,6 +1042,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, d
 		KASSERT(err == 0, ("insmntque() failed: error %d", err));
 	}
 	ZFS_OBJ_HOLD_EXIT(zfsvfs, obj);
+	getnewvnode_drop_reserve();
 }
 
 /*
@@ -1151,12 +1153,14 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_
 
 	*zpp = NULL;
 
+	getnewvnode_reserve(1);
 again:
 	ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num);
 
 	err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db);
 	if (err) {
 		ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
+		getnewvnode_drop_reserve();
 		return (err);
 	}
 
@@ -1167,6 +1171,7 @@ again:
 	    doi.doi_bonus_size < sizeof (znode_phys_t)))) {
 		sa_buf_rele(db, NULL);
 		ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
+		getnewvnode_drop_reserve();
 		return (EINVAL);
 	}
 
@@ -1230,6 +1235,7 @@ again:
 		sa_buf_rele(db, NULL);
 		mutex_exit(&zp->z_lock);
 		ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
+		getnewvnode_drop_reserve();
 		return (err);
 	}
 
@@ -1265,6 +1271,7 @@ again:
 		}
 	}
 	ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
+	getnewvnode_drop_reserve();
 	return (err);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304121423.r3CENLsr031635>