summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2000-09-19 01:11:18 +0000
committerMarcus Brinkmann <marcus@gnu.org>2000-09-19 01:11:18 +0000
commit856786d380a28a1f29ef97323ff363ccd626f376 (patch)
tree08dbe808b75dc30db9928ff4f259f5c07ce881d9
parent5e8e45c5dd03cf9830aad0b15fce26eab4a73c23 (diff)
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.
-rw-r--r--ChangeLog5
-rw-r--r--linux/dev/glue/block.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1dfe9eb..4e115ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 *)