forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zram: remove max_num_devices limitation
Limiting the number of zram devices to 32 (default max_num_devices value) is confusing, let's drop it. A user with 2TB or 4TB of RAM, for example, can request as many devices as he can handle. Signed-off-by: Sergey Senozhatsky <[email protected]> Acked-by: Minchan Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
1 parent
522698d
commit c3cdb40
Showing
3 changed files
with
4 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1287,12 +1287,6 @@ static int __init zram_init(void) | |
{ | ||
int ret, dev_id; | ||
|
||
if (num_devices > max_num_devices) { | ||
pr_warn("Invalid value for num_devices: %u\n", | ||
num_devices); | ||
return -EINVAL; | ||
} | ||
|
||
zram_major = register_blkdev(0, "zram"); | ||
if (zram_major <= 0) { | ||
pr_warn("Unable to get major number\n"); | ||
|
@@ -1322,7 +1316,7 @@ module_init(zram_init); | |
module_exit(zram_exit); | ||
|
||
module_param(num_devices, uint, 0); | ||
MODULE_PARM_DESC(num_devices, "Number of zram devices"); | ||
MODULE_PARM_DESC(num_devices, "Number of pre-created zram devices"); | ||
|
||
MODULE_LICENSE("Dual BSD/GPL"); | ||
MODULE_AUTHOR("Nitin Gupta <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters