File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ static void dax_free_inode(struct inode *inode)
363
363
{
364
364
struct dax_device * dax_dev = to_dax_dev (inode );
365
365
if (inode -> i_rdev )
366
- ida_simple_remove (& dax_minor_ida , iminor (inode ));
366
+ ida_free (& dax_minor_ida , iminor (inode ));
367
367
kmem_cache_free (dax_cache , dax_dev );
368
368
}
369
369
@@ -445,7 +445,7 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops)
445
445
if (WARN_ON_ONCE (ops && !ops -> zero_page_range ))
446
446
return ERR_PTR (- EINVAL );
447
447
448
- minor = ida_simple_get (& dax_minor_ida , 0 , MINORMASK + 1 , GFP_KERNEL );
448
+ minor = ida_alloc_max (& dax_minor_ida , MINORMASK , GFP_KERNEL );
449
449
if (minor < 0 )
450
450
return ERR_PTR (- ENOMEM );
451
451
@@ -459,7 +459,7 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops)
459
459
return dax_dev ;
460
460
461
461
err_dev :
462
- ida_simple_remove (& dax_minor_ida , minor );
462
+ ida_free (& dax_minor_ida , minor );
463
463
return ERR_PTR (- ENOMEM );
464
464
}
465
465
EXPORT_SYMBOL_GPL (alloc_dax );
You can’t perform that action at this time.
0 commit comments