Simplify dnode_level_is_l2cacheable()

We should not dereference through dn_handle->dnh_dnode once we
already have a dnode pointer.  The result will be the same.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Closes #18212
This commit is contained in:
Alexander Motin authored and GitHub committed 2026-02-16 10:34:22 -05:00
1 parent ba970eb202
commit 0f9564e85b
1 file changed
+1 -2
+1 -2
View File
@@ -671,8 +671,7 @@ dnode_level_is_l2cacheable(blkptr_t *bp, dnode_t *dn, int64_t level)
{
if (dn->dn_objset->os_secondary_cache == ZFS_CACHE_ALL ||
(dn->dn_objset->os_secondary_cache == ZFS_CACHE_METADATA &&
(level > 0 ||
DMU_OT_IS_METADATA(dn->dn_handle->dnh_dnode->dn_type)))) {
(level > 0 || DMU_OT_IS_METADATA(dn->dn_type)))) {
if (l2arc_exclude_special == 0)
return (B_TRUE);