On 02/22/2017 01:20 AM, Jan Kara wrote: > On Tue 21-02-17 19:53:29, Bart Van Assche wrote: >> This change looks suspicious to me. There are drivers that create a >> block layer queue but neither call device_add_disk() nor del_gendisk(), >> e.g. drivers/scsi/st.c. Although bdi_init() will be called for the >> queues created by these drivers, this patch will cause the >> bdi_unregister() call to be skipped for these drivers. > > Well, the thing is that bdi_unregister() is the counterpart to > bdi_register(). Unless you call bdi_register(), which happens only in > device_add_disk() (and some filesystems which create their private bdis), > there's no point in calling bdi_unregister(). Counterpart to bdi_init() is > bdi_exit() and that gets called always once bdi reference count drops to 0. That makes sense to me. Hence: Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>