Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107194398
D47154.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
613 B
Referenced Files
None
Subscribers
None
D47154.diff
View Options
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -1477,11 +1477,14 @@
PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev)));
- /* detach parent before deleting children, if any */
+ /*
+ * Detach child. Ideally this cleans up any grandchild
+ * devices.
+ */
if ((error = device_detach(child)) != 0)
return (error);
- /* remove children second */
+ /* Delete any grandchildren left after detach. */
while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) {
error = device_delete_child(child, grandchild);
if (error)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 11:46 AM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14229921
Default Alt Text
D47154.diff (613 B)
Attached To
Mode
D47154: device_delete_child: Update comments
Attached
Detach File
Event Timeline
Log In to Comment