lightnvm: prevent target type module removal when in use
If target type module e.g. pblk here is unloaded (rmmod) while module is in use (after creating target) system crashes. We fix this by using module API refcnt. Signed-off-by: Rakesh Pandit <rakesh@tuxera.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
47bc227dee
commit
900148296b
@@ -1044,6 +1044,7 @@ static struct nvm_tgt_type tt_pblk = {
|
||||
|
||||
.sysfs_init = pblk_sysfs_init,
|
||||
.sysfs_exit = pblk_sysfs_exit,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int __init pblk_module_init(void)
|
||||
|
Reference in New Issue
Block a user