On Wed, Nov 14, 2007 at 10:19:48AM -0800, Greg KH wrote:
This patch, as found by Dave Young, should fix the issue:
I'll roll it into my larger patchset so that Andrew will get it
automatically next release, but here it is for people to use now.
thanks,
greg k-h
--------------
From: Greg Kroah-Hartman <gregkh@suse.de>
Subject: fix bug with adding new block devices in -mm
need to set the kset before initializing the kobject.
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -718,9 +718,9 @@ struct gendisk *alloc_disk_node(int mino
}
}
disk->minors = minors;
- kobject_init(&disk->kobj);
disk->kobj.kset = block_kset;
disk->kobj.ktype = &ktype_block;
+ kobject_init(&disk->kobj);
rand_initialize_disk(disk);
INIT_WORK(&disk->async_notify,
media_change_notify_thread);
-