Thread (26 messages) 26 messages, 5 authors, 2021-08-21

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

From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date: 2021-08-18 14:44:42

On 2021/08/18 22:27, Greg KH wrote:
On Wed, Aug 18, 2021 at 08:07:32PM +0900, Tetsuo Handa wrote:
quoted
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()...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help