This commit is contained in:
Igor K 2024-07-17 07:20:48 +08:00 committed by GitHub
commit 8537b8638c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -6072,6 +6072,9 @@ spa_get_stats(const char *name, nvlist_t **config,
*config = NULL; *config = NULL;
error = spa_open_common(name, &spa, FTAG, NULL, config); error = spa_open_common(name, &spa, FTAG, NULL, config);
if(error == ENOENT) {
return (error);
}
if (spa != NULL) { if (spa != NULL) {
/* /*
@ -6116,7 +6119,7 @@ spa_get_stats(const char *name, nvlist_t **config,
if (spa == NULL) { if (spa == NULL) {
mutex_enter(&spa_namespace_lock); mutex_enter(&spa_namespace_lock);
spa = spa_lookup(name); spa = spa_lookup(name);
if (spa) if (spa != NULL)
spa_altroot(spa, altroot, buflen); spa_altroot(spa, altroot, buflen);
else else
altroot[0] = '\0'; altroot[0] = '\0';