aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module/zfs/dbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/module/zfs/dbuf.c')
-rw-r--r--sys/contrib/openzfs/module/zfs/dbuf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/contrib/openzfs/module/zfs/dbuf.c b/sys/contrib/openzfs/module/zfs/dbuf.c
index fccc4c5b5b94..72c597609ade 100644
--- a/sys/contrib/openzfs/module/zfs/dbuf.c
+++ b/sys/contrib/openzfs/module/zfs/dbuf.c
@@ -446,7 +446,10 @@ static boolean_t
dbuf_include_in_metadata_cache(dmu_buf_impl_t *db)
{
DB_DNODE_ENTER(db);
- dmu_object_type_t type = DB_DNODE(db)->dn_type;
+ dnode_t *dn = DB_DNODE(db);
+ dmu_object_type_t type = dn->dn_storage_type;
+ if (type == DMU_OT_NONE)
+ type = dn->dn_type;
DB_DNODE_EXIT(db);
/* Check if this dbuf is one of the types we care about */