Print this page
const-ify make segment ops structures
There is no reason to keep the segment ops structures writable.
*** 75,85 ****
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);
! struct seg_ops segnf_ops = {
.dup = segnf_dup,
.unmap = segnf_unmap,
.free = segnf_free,
.fault = (faultcode_t (*)(struct hat *, struct seg *, caddr_t,
size_t, enum fault_type, enum seg_rw))segnf_nomap,
--- 75,85 ----
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 = {
.dup = segnf_dup,
.unmap = segnf_unmap,
.free = segnf_free,
.fault = (faultcode_t (*)(struct hat *, struct seg *, caddr_t,
size_t, enum fault_type, enum seg_rw))segnf_nomap,