mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
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
This commit is contained in:
parent
863a6d6bbf
commit
7546d4b74e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206199
@ -4288,7 +4288,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user