Print this page
lgrp: getpolicy seg op has been around long enough
This special casing has been around for more than 10 years.  It's time for
it to go.  (There are no third party segment drivers anyway.)
segop_getpolicy already checks for a NULL op
patch lower-case-segops

*** 3499,3526 **** * Get memory allocation policy for this segment */ lgrp_mem_policy_info_t * lgrp_mem_policy_get(struct seg *seg, caddr_t vaddr) { ! lgrp_mem_policy_info_t *policy_info; ! extern struct seg_ops segspt_ops; ! extern struct seg_ops segspt_shmops; ! ! /* ! * This is for binary compatibility to protect against third party ! * segment drivers which haven't recompiled to allow for ! * SEGOP_GETPOLICY() ! */ ! if (seg->s_ops != &segvn_ops && seg->s_ops != &segspt_ops && ! seg->s_ops != &segspt_shmops) ! return (NULL); ! ! policy_info = NULL; ! if (seg->s_ops->getpolicy != NULL) ! policy_info = SEGOP_GETPOLICY(seg, vaddr); ! ! return (policy_info); } /* * Set policy for allocating private memory given desired policy, policy info, * size in bytes of memory that policy is being applied. --- 3499,3509 ---- * Get memory allocation policy for this segment */ lgrp_mem_policy_info_t * lgrp_mem_policy_get(struct seg *seg, caddr_t vaddr) { ! return (segop_getpolicy(seg, vaddr)); } /* * Set policy for allocating private memory given desired policy, policy info, * size in bytes of memory that policy is being applied.