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,11 +70,10 @@
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 = {
@@ -96,11 +95,10 @@
.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.
@@ -435,18 +433,10 @@
*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)
{