Add ddt_object_count() error handling
[zfs.git] / module / zfs / ddt_zap.c
index 1733448..65b14ab 100644 (file)
@@ -138,14 +138,10 @@ ddt_zap_walk(objset_t *os, uint64_t object, ddt_entry_t *dde, uint64_t *walk)
        return (error);
 }
 
-static uint64_t
-ddt_zap_count(objset_t *os, uint64_t object)
+static int
+ddt_zap_count(objset_t *os, uint64_t object, uint64_t *count)
 {
-       uint64_t count = 0;
-
-       VERIFY(zap_count(os, object, &count) == 0);
-
-       return (count);
+       return zap_count(os, object, count);
 }
 
 const ddt_ops_t ddt_zap_ops = {