From 0f9564e85b0103aef43951cd931cb88fa9a68d6c Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Mon, 16 Feb 2026 10:34:22 -0500 Subject: [PATCH] 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 Signed-off-by: Alexander Motin Closes #18212 --- module/zfs/dbuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index e5fe400c4..8d7dbbc11 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -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);