summaryrefslogtreecommitdiffstats
path: root/kernel/block/genhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/block/genhd.c')
-rw-r--r--kernel/block/genhd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/block/genhd.c b/kernel/block/genhd.c
index e5cafa515..a5bed6bc8 100644
--- a/kernel/block/genhd.c
+++ b/kernel/block/genhd.c
@@ -612,7 +612,7 @@ void add_disk(struct gendisk *disk)
/* Register BDI before referencing it from bdev */
bdi = &disk->queue->backing_dev_info;
- bdi_register_dev(bdi, disk_devt(disk));
+ bdi_register_owner(bdi, disk_to_dev(disk));
blk_register_region(disk_devt(disk), disk->minors, NULL,
exact_match, exact_lock, disk);
@@ -831,6 +831,7 @@ static void disk_seqf_stop(struct seq_file *seqf, void *v)
if (iter) {
class_dev_iter_exit(iter);
kfree(iter);
+ seqf->private = NULL;
}
}