Re: [PATCH v4] block: genhd: don't call probe function with major_names_lock held

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

 



On 2021/08/18 22:27, Greg KH wrote:
> On Wed, Aug 18, 2021 at 08:07:32PM +0900, Tetsuo Handa wrote:
>> This patch adds THIS_MODULE parameter to __register_blkdev() as with
>> usb_register(), and drops major_names_lock before calling probe function
>> by holding a reference to that module which contains that probe function.
>>
>> Since cdev uses register_chrdev() and __register_chrdev(), bdev should be
>> able to preserve register_blkdev() and __register_blkdev() naming scheme.
> 
> Note, the cdev api is anything but good, so should not be used as an
> excuse for anything.  Don't copy it unless you have a very good reason.
> 
> Also, what changed in this version?  I see no patch history here :(

Nothing but passing THIS_MODULE automagically using macro, as a response to

  > Do not force modules to put their own THIS_MODULE macro as a parameter,
  > put it in the .h file so that it happens automagically, much like the
  > usb_register() define in include/linux/usb.h is created.

suggestion. You also said

  > Why stop at 4 _ characters?
  > 
  > {sigh}
  > 
  > I think you need a new naming scheme here...

but I think current naming scheme is fine, and I even think v3 patch is fine.
Please suggest alternative candidates for register_blkdev() and __register_blkdev()...




[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