summaryrefslogtreecommitdiff
path: root/include/linux/lightnvm.h
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2017-10-13 15:45:50 +0300
committerJens Axboe <axboe@kernel.dk>2017-10-13 17:34:57 +0300
commit900148296b78c61aa8c443dc594c0da968c3be53 (patch)
tree916dfc2000208ddb8cc5e829ddef190cf9049cff /include/linux/lightnvm.h
parent47bc227deedbcf3ac214a2d922c28dfa5e403f09 (diff)
downloadlinux-900148296b78c61aa8c443dc594c0da968c3be53.tar.xz
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>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r--include/linux/lightnvm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 7dfa56ebbc6d..7b80ac911d26 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -460,6 +460,7 @@ struct nvm_tgt_type {
/* For internal use */
struct list_head list;
+ struct module *owner;
};
extern struct nvm_tgt_type *nvm_find_target_type(const char *, int);