Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1264733 > unrolled thread

[PATCH v2 1/3] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister

Started byGeliang Tang <geliangtang@163.com>
First post2015-11-07 06:00 +0100
Last post2015-11-07 06:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 1/3] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister Geliang Tang <geliangtang@163.com> - 2015-11-07 06:00 +0100

#1264733 — [PATCH v2 1/3] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister

FromGeliang Tang <geliangtang@163.com>
Date2015-11-07 06:00 +0100
Subject[PATCH v2 1/3] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister
Message-ID<qs3Lz-608-7@gated-at.bofh.it>
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 588461b..5b8f1eb 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -497,9 +497,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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web