From 08641d9007850fcd6dc43b4526b10db537f21d1f Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 6 Mar 2023 11:15:37 -0500 Subject: [PATCH] Suppress static analyzer warning in dmu_objset_create_impl_dnstats() ae7e7006500ca37c471dd625cd5cbfc590b49885 added an assertion to suppress a complaint from Clang's static analyzer. Unfortunately, it missed another way for Clang to complain about this function. This adds another assertion to handle that. Reviewed-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #14575 --- module/zfs/dmu_objset.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index 133f678dea..c19ebf4249 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -1128,6 +1128,7 @@ dmu_objset_create_impl_dnstats(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp, OBJSET_FLAG_USEROBJACCOUNTING_COMPLETE; } if (dmu_objset_projectquota_enabled(os)) { + ASSERT3P(ds, !=, NULL); ds->ds_feature_activation[ SPA_FEATURE_PROJECT_QUOTA] = (void *)B_TRUE; os->os_phys->os_flags |=