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,2022 **** } int segop_getmemid(struct seg *seg, caddr_t addr, memid_t *mp) { ! VERIFY3P(seg->s_ops->getmemid, !=, NULL); return (seg->s_ops->getmemid(seg, addr, mp)); } struct lgrp_mem_policy_info * --- 2012,2023 ---- } int segop_getmemid(struct seg *seg, caddr_t addr, memid_t *mp) { ! if (seg->s_ops->getmemid == NULL) ! return (ENODEV); return (seg->s_ops->getmemid(seg, addr, mp)); } struct lgrp_mem_policy_info *