[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFLxGvzB64YgGS4nmx++f=jwY1h=Uha1d1nP_VONtemm0DoEfA@mail.gmail.com>
Date: Mon, 18 Nov 2019 09:37:22 +0100
From: Richard Weinberger <richard.weinberger@...il.com>
To: Aditya Pakki <pakki001@....edu>
Cc: David Woodhouse <dwmw2@...radead.org>, kjlu@....edu,
LKML <linux-kernel@...r.kernel.org>,
linux-mtd@...ts.infradead.org, Richard Weinberger <richard@....at>
Subject: Re: [PATCH] jffs2: Reduce the severity level of logging errors
On Sun, Nov 17, 2019 at 6:44 PM Aditya Pakki <pakki001@....edu> wrote:
>
> Unlike other instances of critical errors that call BUG(), kmalloc
> failure in jffs2_wbuf_recover does not require pr_crit. Replace this
> error logging with pr_warn().
Well, JFFS2 warns that data will get lost. IMHO this deserves pr_crit().
Unless you have a strong reason to change this I'd leave it as is.
> Signed-off-by: Aditya Pakki <pakki001@....edu>
> ---
> fs/jffs2/wbuf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
> index c6821a509481..59e145220b51 100644
> --- a/fs/jffs2/wbuf.c
> +++ b/fs/jffs2/wbuf.c
> @@ -339,7 +339,7 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c)
>
> buf = kmalloc(end - start, GFP_KERNEL);
> if (!buf) {
> - pr_crit("Malloc failure in wbuf recovery. Data loss ensues.\n");
> + pr_warn("Malloc failure in wbuf recovery. Data loss ensues.\n");
>
> goto read_failed;
> }
> @@ -354,7 +354,7 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c)
> ret = 0;
>
> if (ret || retlen != c->wbuf_ofs - start) {
> - pr_crit("Old data are already lost in wbuf recovery. Data loss ensues.\n");
> + pr_warn("Old data are already lost in wbuf recovery. Data loss ensues.\n");
>
> kfree(buf);
> buf = NULL;
> --
> 2.17.1
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
--
Thanks,
//richard
Powered by blists - more mailing lists