[RH7,1/2] ploop: remove module param ploop_major as it can break everything

Submitted by Pavel Tikhomirov on Sept. 25, 2019, 9:53 a.m.

Details

Message ID 20190925095332.17201-1-ptikhomirov@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Pavel Tikhomirov Sept. 25, 2019, 9:53 a.m.
For instance: in ploop_mod_init we register ploop_major and unregister
PLOOP_DEVICE_MAJOR, in MODULE_ALIAS_BLOCKDEV_MAJOR we can only use
PLOOP_DEVICE_MAJOR as it is set at compilation time, in
ploop_set_dm_crypt_bdev we also use PLOOP_DEVICE_MAJOR.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 drivers/block/ploop/dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index b6cb408347d2..c65a99861548 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -5696,8 +5696,14 @@  static const struct file_operations proc_ploop_minor = {
 
 module_param(ploop_max, int, 0);
 MODULE_PARM_DESC(ploop_max, "Maximum number of ploop devices");
+/*
+ * Comment out ploop_major module parameter as we use both ploop_major and
+ * PLOOP_DEVICE_MAJOR interchangeably and we can't afford them to differ.
+ */
+/*
 module_param(ploop_major, int, 0);
 MODULE_PARM_DESC(ploop_major, "Major number of ploop device");
+*/
 module_param(max_map_pages, int, 0644);
 MODULE_PARM_DESC(ploop_max_map_pages, "Maximal amount of pages taken by map cache");
 module_param(root_threshold, long, 0644);