Re: [PATCH 04/13] block: Move bdi_unregister() to del_gendisk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux