pstore: add pstore unregister
pstore doesn't support unregistering yet. It was marked as TODO. This patch adds some code to fix it: 1) Add functions to unregister kmsg/console/ftrace/pmsg. 2) Add a function to free compression buffer. 3) Unmap the memory and free it. 4) Add a function to unregister pstore filesystem. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Kees Cook <keescook@chromium.org> [Removed __exit annotation from ramoops_remove(). Reported by Arnd Bergmann] Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
@@ -75,20 +75,8 @@ struct pstore_info {
|
||||
|
||||
#define PSTORE_FLAGS_FRAGILE 1
|
||||
|
||||
#ifdef CONFIG_PSTORE
|
||||
extern int pstore_register(struct pstore_info *);
|
||||
extern void pstore_unregister(struct pstore_info *);
|
||||
extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason);
|
||||
#else
|
||||
static inline int
|
||||
pstore_register(struct pstore_info *psi)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline bool
|
||||
pstore_cannot_block_path(enum kmsg_dump_reason reason)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_LINUX_PSTORE_H*/
|
||||
|
Reference in New Issue
Block a user