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

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

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2021-08-15 07:07:17

On Sun, Aug 15, 2021 at 03:52:45PM +0900, Tetsuo Handa wrote:
quoted hunk ↗ jump to hunk
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -303,9 +303,9 @@ struct gendisk *__blk_alloc_disk(int node);
 void blk_cleanup_disk(struct gendisk *disk);
 
 int __register_blkdev(unsigned int major, const char *name,
-		void (*probe)(dev_t devt));
+		      void (*probe)(dev_t devt), struct module *owner);
 #define register_blkdev(major, name) \
-	__register_blkdev(major, name, NULL)
+	__register_blkdev(major, name, NULL, NULL)
 void unregister_blkdev(unsigned int major, const char *name);
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.

If you do that, you can probably get rid of the __register_blkdev()
direct calls as well...

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