[PATCH v2 1/2] fs: warn about impending deprecation of mandatory locks
Steven Rostedt
rostedt at goodmis.org
Fri Aug 20 09:08:48 PDT 2021
On Fri, 20 Aug 2021 17:52:19 +0200
David Hildenbrand <david at 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
More information about the linux-afs
mailing list