Print this page
use NULL dump segop as a shorthand for no-op
Instead of forcing every segment driver to implement a dummy function that
does nothing, handle NULL dump segop function pointer as a no-op shorthand.

*** 70,80 **** static int segnf_getprot(struct seg *seg, caddr_t addr, size_t len, uint_t *protv); static u_offset_t segnf_getoffset(struct seg *seg, caddr_t addr); static int segnf_gettype(struct seg *seg, caddr_t addr); static int segnf_getvp(struct seg *seg, caddr_t addr, struct vnode **vpp); - static void segnf_dump(struct seg *seg); static int segnf_pagelock(struct seg *seg, caddr_t addr, size_t len, struct page ***ppp, enum lock_type type, enum seg_rw rw); const struct seg_ops segnf_ops = { --- 70,79 ----
*** 96,106 **** .getoffset = segnf_getoffset, .gettype = segnf_gettype, .getvp = segnf_getvp, .advise = (int (*)(struct seg *, caddr_t, size_t, uint_t)) segnf_nop, - .dump = segnf_dump, .pagelock = segnf_pagelock, }; /* * vnode and page for the page of zeros we use for the nf mappings. --- 95,104 ----
*** 435,452 **** *vpp = &nfvp; return (0); } - /* - * segnf pages are not dumped, so we just return - */ - /* ARGSUSED */ - static void - segnf_dump(struct seg *seg) - {} - /*ARGSUSED*/ static int segnf_pagelock(struct seg *seg, caddr_t addr, size_t len, struct page ***ppp, enum lock_type type, enum seg_rw rw) { --- 433,442 ----