Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -u a/block/blk-core.c b/block/blk-core.c
- --- a/block/blk-core.c 2017-02-26 05:08:29.000000000 -0500
- +++ b/block/blk-core.c 2018-12-06 11:54:54.109695294 -0500
- @@ -595,8 +595,6 @@
- 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);
- }
- diff -u a/block/genhd.c b/block/genhd.c
- --- a/block/genhd.c 2017-02-26 05:08:29.000000000 -0500
- +++ b/block/genhd.c 2018-12-06 17:53:00.777695294 -0500
- @@ -656,7 +656,16 @@
- disk->flags &= ~GENHD_FL_UP;
- sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");
- - blk_unregister_queue(disk);
- + if (disk->queue) {
- + /*
- + * 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);
- + } else {
- + WARN_ON(1);
- + }
- blk_unregister_region(disk_devt(disk), disk->minors);
- part_stat_set_all(&disk->part0, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement