Print this page
use NULL getmemid segop as a shorthand for ENODEV
Instead of forcing every segment driver to implement a dummy function to
return (hopefully) ENODEV, handle NULL getmemid segop function pointer as
"return ENODEV" shorthand.

@@ -2012,11 +2012,12 @@
 }
 
 int
 segop_getmemid(struct seg *seg, caddr_t addr, memid_t *mp)
 {
-        VERIFY3P(seg->s_ops->getmemid, !=, NULL);
+        if (seg->s_ops->getmemid == NULL)
+                return (ENODEV);
 
         return (seg->s_ops->getmemid(seg, addr, mp));
 }
 
 struct lgrp_mem_policy_info *