diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/dax/Kconfig | 5 | ||||
| -rw-r--r-- | drivers/dax/super.c | 11 |
2 files changed, 3 insertions, 13 deletions
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig index 6b7e20eae16c..b79aa8f7a497 100644 --- a/drivers/dax/Kconfig +++ b/drivers/dax/Kconfig | |||
| @@ -28,9 +28,4 @@ config DEV_DAX_PMEM | |||
| 28 | 28 | ||
| 29 | Say Y if unsure | 29 | Say Y if unsure |
| 30 | 30 | ||
| 31 | config NR_DEV_DAX | ||
| 32 | int "Maximum number of Device-DAX instances" | ||
| 33 | default 32768 | ||
| 34 | range 256 2147483647 | ||
| 35 | |||
| 36 | endif | 31 | endif |
diff --git a/drivers/dax/super.c b/drivers/dax/super.c index e8998d15f3cd..ebf43f531ada 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c | |||
| @@ -21,10 +21,6 @@ | |||
| 21 | #include <linux/dax.h> | 21 | #include <linux/dax.h> |
| 22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
| 23 | 23 | ||
| 24 | static int nr_dax = CONFIG_NR_DEV_DAX; | ||
| 25 | module_param(nr_dax, int, S_IRUGO); | ||
| 26 | MODULE_PARM_DESC(nr_dax, "max number of dax device instances"); | ||
| 27 | |||
| 28 | static dev_t dax_devt; | 24 | static dev_t dax_devt; |
| 29 | DEFINE_STATIC_SRCU(dax_srcu); | 25 | DEFINE_STATIC_SRCU(dax_srcu); |
| 30 | static struct vfsmount *dax_mnt; | 26 | static struct vfsmount *dax_mnt; |
| @@ -331,7 +327,7 @@ struct dax_device *alloc_dax(void *private, const char *__host, | |||
| 331 | if (__host && !host) | 327 | if (__host && !host) |
| 332 | return NULL; | 328 | return NULL; |
| 333 | 329 | ||
| 334 | minor = ida_simple_get(&dax_minor_ida, 0, nr_dax, GFP_KERNEL); | 330 | minor = ida_simple_get(&dax_minor_ida, 0, MINORMASK+1, GFP_KERNEL); |
| 335 | if (minor < 0) | 331 | if (minor < 0) |
| 336 | goto err_minor; | 332 | goto err_minor; |
| 337 | 333 | ||
| @@ -475,8 +471,7 @@ static int __init dax_fs_init(void) | |||
| 475 | if (rc) | 471 | if (rc) |
| 476 | return rc; | 472 | return rc; |
| 477 | 473 | ||
| 478 | nr_dax = max(nr_dax, 256); | 474 | rc = alloc_chrdev_region(&dax_devt, 0, MINORMASK+1, "dax"); |
| 479 | rc = alloc_chrdev_region(&dax_devt, 0, nr_dax, "dax"); | ||
| 480 | if (rc) | 475 | if (rc) |
| 481 | __dax_fs_exit(); | 476 | __dax_fs_exit(); |
| 482 | return rc; | 477 | return rc; |
| @@ -484,7 +479,7 @@ static int __init dax_fs_init(void) | |||
| 484 | 479 | ||
| 485 | static void __exit dax_fs_exit(void) | 480 | static void __exit dax_fs_exit(void) |
| 486 | { | 481 | { |
| 487 | unregister_chrdev_region(dax_devt, nr_dax); | 482 | unregister_chrdev_region(dax_devt, MINORMASK+1); |
| 488 | ida_destroy(&dax_minor_ida); | 483 | ida_destroy(&dax_minor_ida); |
| 489 | __dax_fs_exit(); | 484 | __dax_fs_exit(); |
| 490 | } | 485 | } |
