From 0a48a24e663a04e34e2ed4e55390ad96f178dbea Mon Sep 17 00:00:00 2001 From: timh Date: Thu, 24 Jul 2008 15:04:31 -0700 Subject: PSARC 2008/223 Pool root file system properties via zpool(1M) 6647661 "set once" / "create time only" properties can't be set for pool level dataset --- usr/src/uts/common/fs/zfs/zfs_vfsops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr/src/uts/common/fs/zfs/zfs_vfsops.c') diff --git a/usr/src/uts/common/fs/zfs/zfs_vfsops.c b/usr/src/uts/common/fs/zfs/zfs_vfsops.c index 1b471c8c8a..ff12fe7be2 100644 --- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c +++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c @@ -1623,7 +1623,7 @@ int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value) { const char *pname; - int error; + int error = ENOENT; /* * Look up the file system's value for the property. For the @@ -1634,7 +1634,8 @@ zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value) else pname = zfs_prop_to_name(prop); - error = zap_lookup(os, MASTER_NODE_OBJ, pname, 8, 1, value); + if (os != NULL) + error = zap_lookup(os, MASTER_NODE_OBJ, pname, 8, 1, value); if (error == ENOENT) { /* No value set, use the default value */ -- cgit v1.2.3