From owner-svn-src-head@FreeBSD.ORG Mon Apr 5 18:27:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D92E106564A; Mon, 5 Apr 2010 18:27:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BADA8FC1C; Mon, 5 Apr 2010 18:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IRwgk008634; Mon, 5 Apr 2010 18:27:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IRwVD008632; Mon, 5 Apr 2010 18:27:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004051827.o35IRwVD008632@svn.freebsd.org> From: Xin LI Date: Mon, 5 Apr 2010 18:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206199 - head/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:27:58 -0000 Author: delphij Date: Mon Apr 5 18:27:58 2010 New Revision: 206199 URL: http://svn.freebsd.org/changeset/base/206199 Log: Refine previous partial merge of OpenSolaris onnv revision 9396:f41cf682d0d3. This fixes a regression that zfs list would crash on zfs having user properties. PR: kern/145377 Submitted by: mm Approved by: pjd Obtained from: OpenSolaris MFC after: 10 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 5 18:25:30 2010 (r206198) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 5 18:27:58 2010 (r206199) @@ -4288,7 +4288,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, ui zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* + * We leave user:props in the nvlist, so there will be + * some ZPROP_INVAL. To be extra safe, don't prune + * those. + */ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next;