diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-01-10 05:15:17 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:45:31 -0500 |
commit | 2b8a90b55533c66258a1ff0fb27b8cffa95665c4 (patch) | |
tree | 24e6d5816123e7912e1fe7db0261c083da8810f3 /drivers/block | |
parent | 110a204a354a5a69f99ed0bc8e6d779e6a94d410 (diff) |
drbd: Corrected off-by-one error in DRBD_MINOR_COUNT_MAX
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 4074d6699307..da98bff7c333 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -85,7 +85,8 @@ MODULE_AUTHOR("Philipp Reisner <phil@linbit.com>, " | |||
85 | MODULE_DESCRIPTION("drbd - Distributed Replicated Block Device v" REL_VERSION); | 85 | MODULE_DESCRIPTION("drbd - Distributed Replicated Block Device v" REL_VERSION); |
86 | MODULE_VERSION(REL_VERSION); | 86 | MODULE_VERSION(REL_VERSION); |
87 | MODULE_LICENSE("GPL"); | 87 | MODULE_LICENSE("GPL"); |
88 | MODULE_PARM_DESC(minor_count, "Maximum number of drbd devices (1-255)"); | 88 | MODULE_PARM_DESC(minor_count, "Maximum number of drbd devices (" |
89 | __stringify(DRBD_MINOR_COUNT_MIN) "-" __stringify(DRBD_MINOR_COUNT_MAX) ")"); | ||
89 | MODULE_ALIAS_BLOCKDEV_MAJOR(DRBD_MAJOR); | 90 | MODULE_ALIAS_BLOCKDEV_MAJOR(DRBD_MAJOR); |
90 | 91 | ||
91 | #include <linux/moduleparam.h> | 92 | #include <linux/moduleparam.h> |
@@ -115,7 +116,7 @@ module_param(fault_devs, int, 0644); | |||
115 | #endif | 116 | #endif |
116 | 117 | ||
117 | /* module parameter, defined */ | 118 | /* module parameter, defined */ |
118 | unsigned int minor_count = 32; | 119 | unsigned int minor_count = DRBD_MINOR_COUNT_DEF; |
119 | int disable_sendpage; | 120 | int disable_sendpage; |
120 | int allow_oos; | 121 | int allow_oos; |
121 | unsigned int cn_idx = CN_IDX_DRBD; | 122 | unsigned int cn_idx = CN_IDX_DRBD; |
@@ -3456,7 +3457,7 @@ int __init drbd_init(void) | |||
3456 | return -EINVAL; | 3457 | return -EINVAL; |
3457 | } | 3458 | } |
3458 | 3459 | ||
3459 | if (1 > minor_count || minor_count > 255) { | 3460 | if (minor_count < DRBD_MINOR_COUNT_MIN || minor_count > DRBD_MINOR_COUNT_MAX) { |
3460 | printk(KERN_ERR | 3461 | printk(KERN_ERR |
3461 | "drbd: invalid minor_count (%d)\n", minor_count); | 3462 | "drbd: invalid minor_count (%d)\n", minor_count); |
3462 | #ifdef MODULE | 3463 | #ifdef MODULE |