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 <[email protected]>
> > Signed-off-by: Holger Assmann <[email protected]>
> > ---
> >  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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to