diff options
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r-- | sys/dev/md/md.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 94fa730..4b6cba1 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -240,9 +240,13 @@ dimension(off_t size) /* * XXX: the top layer is probably not fully populated, so we allocate - * too much space for ip->array in new_indir() here. + * too much space for ip->array in here. */ - ip = new_indir(layer * nshift); + ip = malloc(sizeof *ip, M_MD, M_WAITOK | M_ZERO); + ip->array = malloc(sizeof(uintptr_t) * NINDIR, + M_MDSECT, M_WAITOK | M_ZERO); + ip->total = NINDIR; + ip->shift = layer * nshift; return (ip); } |