Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9af69213 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "block: Move bdi_unregister() to del_gendisk()"

parents bb6316a1 5d9a2c9e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
}
+5 −0
Original line number Diff line number Diff line
@@ -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);