On Fri, 20 Aug 2021 17:52:19 +0200 David Hildenbrand david@redhat.com wrote:
+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