lkml.org 
[lkml]   [2015]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister
Date
When PSTORE_FLAGS_FRAGILE flag is set, only kmsg is registered in
pstore_register. So, under these circumstances, only kmsg needs to
be unregistered in pstore_unregister.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
fs/pstore/platform.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 0aab920..7ad2038 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -496,9 +496,12 @@ EXPORT_SYMBOL_GPL(pstore_register);

void pstore_unregister(struct pstore_info *psi)
{
- pstore_unregister_pmsg();
- pstore_unregister_ftrace();
- pstore_unregister_console();
+ if ((psi->flags & PSTORE_FLAGS_FRAGILE) == 0) {
+ pstore_unregister_pmsg();
+ pstore_unregister_ftrace();
+ pstore_unregister_console();
+ }
+
pstore_unregister_kmsg();

free_buf_for_compression();
--
2.5.0



\
 
 \ /
  Last update: 2015-10-23 17:21    [W:0.260 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site