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: Greg KH <gregkh@linuxfoundation.org>
Date: 2021-08-18 15:28:49

On Wed, Aug 18, 2021 at 11:44:14PM +0900, Tetsuo Handa wrote:
On 2021/08/18 22:27, Greg KH wrote:
quoted
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.
Then properly document it as you should when sending new versions of
patches.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help