diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | linux/dev/glue/block.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2000-09-19 Marcus Brinkmann <marcus@gnu.org> + + * linux/dev/glue/block.c (init_partition): Move initialization + of MASK until it is asserted that gd is non-NULL. + 2000-08-17 OKUJI Yoshinori <okuji@gnu.org> * linux/dev/glue/block.c (rdwr_partial): Mask the minor device diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c index 5ca4456..12bcfca 100644 --- a/linux/dev/glue/block.c +++ b/linux/dev/glue/block.c @@ -937,13 +937,14 @@ init_partition (struct name_map *np, kdev_t *dev, struct gendisk *gd = ds->gd; struct partition *p; struct temp_data *d = current_thread ()->pcb->data; - unsigned mask = (1 << gd->minor_shift) - 1; + unsigned mask; if (! gd) { *part = -1; return 0; } + mask = (1 << gd->minor_shift) - 1; if (ds->labels) goto check; ds->labels = (struct disklabel **) kalloc (sizeof (struct disklabel *) |