Merge "block: Move bdi_unregister() to del_gendisk()"
This commit is contained in:
commit
9af69213de
2 changed files with 5 additions and 2 deletions
|
@ -609,8 +609,6 @@ void blk_cleanup_queue(struct request_queue *q)
|
|||
q->queue_lock = &q->__queue_lock;
|
||||
spin_unlock_irq(lock);
|
||||
|
||||
bdi_unregister(&q->backing_dev_info);
|
||||
|
||||
/* @q is and will stay empty, shutdown and put */
|
||||
blk_put_queue(q);
|
||||
}
|
||||
|
|
|
@ -656,6 +656,11 @@ void del_gendisk(struct gendisk *disk)
|
|||
disk->flags &= ~GENHD_FL_UP;
|
||||
|
||||
sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");
|
||||
/*
|
||||
* Unregister bdi before releasing device numbers (as they can get
|
||||
* reused and we'd get clashes in sysfs).
|
||||
*/
|
||||
bdi_unregister(&disk->queue->backing_dev_info);
|
||||
blk_unregister_queue(disk);
|
||||
blk_unregister_region(disk_devt(disk), disk->minors);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue