Thread (9 messages) 9 messages, 5 authors, 2021-08-20

Re: [PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks

flat view

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2021-08-20 16:09:58
Also in: linux-fsdevel, linux-mm, linux-nfs, lkml, ocfs2-devel, stable

On Fri, 20 Aug 2021 17:52:19 +0200
David Hildenbrand [off-list ref] wrote:
quoted
+static bool warned_mand;
  static inline bool may_mandlock(void)
  {
+	if (!warned_mand) {
+		warned_mand = true;
+		pr_warn("======================================================\n");
+		pr_warn("WARNING: the mand mount option is being deprecated and\n");
+		pr_warn("         will be removed in v5.15!\n");
+		pr_warn("======================================================\n");
+	}  
Is there a reason not to use pr_warn_once() ?
You would need a single call though, otherwise each pr_warn_once()
would have its own state that it warned once.

	const char warning[] =
		"======================================================\n"
		"WARNING: the mand mount option is being deprecated and\n"
		"         will be removed in v5.15!\n"
		"======================================================\n";

	pr_warn_once(warning);

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help