bug in the present partition code

Andries.Brouwer@cwi.nl
Mon, 29 Jul 2002 15:39:52 +0200 (MEST)


Al,

A BUG_ON at device.h:215 is triggered by
scsi_unregister_host -> sd_detach -> driverfs_remove_partitions ->
device_remove _file
because driverfs_remove_partitions is called for a device
where driverfs_create_partitions was not called for.

(A device without media - no partitions have ever been seen.)

There are various ways to fix - I'll leave it to you to pick
some appropriate one.

Andries

[I find that code becomes ugly when one includes a struct in
another struct. Lots of assignments
ptr = &(p->start_of_struct);
The advantage of having things separate is that one can use
NULL to mean "uninitialized", while &(p->start_of_struct)
is never NULL. So, I wouldn't mind adding a * and an r in the
struct device hd_driverfs_dev; /* support driverfs hiearchy */
in struct hd_struct. But you may have other preferences.]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/