[RHEL7,COMMIT] ploop: remove module param ploop_major as it can break everything

Submitted by Konstantin Khorenko on Sept. 30, 2019, 8:59 a.m.


Message ID 201909300859.x8U8xRpo001061@finist-ce7.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko Sept. 30, 2019, 8:59 a.m.
The commit is pushed to "branch-rh7-3.10.0-957.27.2.vz7.107.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.27.2.vz7.107.10
commit 664f940223a962318999a9916656191767764123
Author: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Date:   Mon Sep 30 11:59:26 2019 +0300

    ploop: remove module param ploop_major as it can break everything
    For instance: in ploop_mod_init we register ploop_major and unregister
    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);