]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix devfs' partition handling
authorAndrew Morton <akpm@digeo.com>
Thu, 3 Apr 2003 00:28:27 +0000 (16:28 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 3 Apr 2003 00:28:27 +0000 (16:28 -0800)
From: Andre Landwehr <andre.landwehr@gmx.net>

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.

hch has acked this.

fs/partitions/check.c

index f5b6dbe5cee63e7f3649997db715c48176b94276..f84bd3e66ef11eab30bf7c91d2a46532f1b6ce57 100644 (file)
@@ -262,6 +262,7 @@ void delete_partition(struct gendisk *disk, int part)
        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);
 }