Skip to contentSkip to conversation

Fix devfs' partition handling

PATCH-2.5 Andre Landwehr 1 participant 1 message Mar 28, 2003

lore
Share & tools
lore
#0 lore raw

Hi,
with / on an IDE harddisk the disks partitions do not appear in devfs, only the disc device. This is due to rescan_partitions being called twice and deleting but not re-creating the entries during the second call. Here's the patch:

fs/partitions/check.c +1 -0
diff -Nur linux-2.5-unmodified/fs/partitions/check.c linux-2.5/fs/partitions/check.c
@@ -262,6 +262,7 @@
 	p->nr_sects = 0;
 	p->reads = p->writes = p->read_sectors = p->write_sectors = 0;
 	devfs_unregister(p->de);
+	p->de = NULL;
 	kobject_unregister(&p->kobj);
 }
 

Have fun
Andre