From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Holger Assmann <h.assmann@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH v2 2/2] fs: jffs2: remove unnecessary slab cache structure
Date: Tue, 30 Nov 2021 11:41:02 +0100 [thread overview]
Message-ID: <20211130104102.GU28260@pengutronix.de> (raw)
In-Reply-To: <384035a6-6fab-0e56-b17a-28ad2cb11650@pengutronix.de>
On Tue, Nov 30, 2021 at 11:29:11AM +0100, Ahmad Fatoum wrote:
> Hi,
>
> On 29.11.21 13:45, Holger Assmann wrote:
> > jffs2_create_slab_caches() and its subsequent kmem_cache calls are not
> > needed in Barebox since they can directly be replaced by malloc calls.
> >
> > This patch performs that replacement as well as the related clean up.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > Signed-off-by: Holger Assmann <h.assmann@pengutronix.de>
> > ---
> > fs/jffs2/fs.c | 10 ----
> > fs/jffs2/malloc.c | 131 +++++++-------------------------------------
> > fs/jffs2/nodelist.h | 2 -
> > 3 files changed, 19 insertions(+), 124 deletions(-)
> >
> > diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
> > index 7538252336..b72721cfc4 100644
> > --- a/fs/jffs2/fs.c
> > +++ b/fs/jffs2/fs.c
> > @@ -416,26 +416,17 @@ static int jffs2_probe(struct device_d *dev)
> > pr_err("error: Failed to initialise compressors\n");
> > goto err_out;
> > }
> > -
> > - ret = jffs2_create_slab_caches();
> > - if (ret) {
> > - pr_err("error: Failed to initialise slab caches\n");
> > - goto err_compressors;
> > - }
> > }
> >
> > if (jffs2_fill_super(fsdev, 0)) {
> > dev_err(dev, "no valid jffs2 found\n");
> > ret = -EINVAL;
> > - goto err_slab;
>
> This should be goto err_compressors. ret = -EINVAL is't
> used in the success path, so the probe will succeed despite the error
> and likely triggering a crash on mount. In that case,
> jffs2_compressors_exit is also never called.
>
> @Sascha, can you fixup?
Did that.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-11-30 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-29 12:45 [PATCH v2 0/2] fs: jffs2: remove slab cache substitute with malloc Holger Assmann
2021-11-29 12:45 ` [PATCH v2 1/2] fs: jffs2: introduce reference counting at probe Holger Assmann
2021-11-29 12:45 ` [PATCH v2 2/2] fs: jffs2: remove unnecessary slab cache structure Holger Assmann
2021-11-30 10:29 ` Ahmad Fatoum
2021-11-30 10:41 ` Sascha Hauer [this message]
2021-11-30 9:58 ` [PATCH v2 0/2] fs: jffs2: remove slab cache substitute with malloc Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211130104102.GU28260@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=h.assmann@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox