diff options
-rw-r--r-- | module/zfs/dmu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index 7d3945433..eb3bc0ed2 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -644,9 +644,13 @@ static int dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset, uint64_t length) { - uint64_t object_size = (dn->dn_maxblkid + 1) * dn->dn_datablksz; + uint64_t object_size; int err; + if (dn == NULL) + return (SET_ERROR(EINVAL)); + + object_size = (dn->dn_maxblkid + 1) * dn->dn_datablksz; if (offset >= object_size) return (0); |