summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2010-12-21 18:38:13 -0800
committerColin Cross <ccross@android.com>2010-12-21 18:38:13 -0800
commit3f29a8834975956ed5590959bfced00cb9bd03ed (patch)
tree03489c32e70a21b586678d217467dce2f1b44cdc /block/genhd.c
parent4ad2ce14311f7ee8474ee48b8fb0fad72648e5eb (diff)
parentb104a07edb2a319f734ddc4fe04852865d8d9e24 (diff)
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Conflicts: drivers/usb/gadget/composite.c Change-Id: I1a332ec21da62aea98912df9a01cf0282ed50ee1
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index aa628253bee1..c26acf69af5a 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -541,13 +541,15 @@ void add_disk(struct gendisk *disk)
disk->major = MAJOR(devt);
disk->first_minor = MINOR(devt);
+ /* Register BDI before referencing it from bdev */
+ bdi = &disk->queue->backing_dev_info;
+ bdi_register_dev(bdi, disk_devt(disk));
+
blk_register_region(disk_devt(disk), disk->minors, NULL,
exact_match, exact_lock, disk);
register_disk(disk);
blk_register_queue(disk);
- bdi = &disk->queue->backing_dev_info;
- bdi_register_dev(bdi, disk_devt(disk));
retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
"bdi");
WARN_ON(retval);