[PATCH 2/2] fs: jffs2: zero initialize allocated inode

Sascha Hauer s.hauer at pengutronix.de
Tue May 19 08:15:19 PDT 2026


On Tue, 19 May 2026 15:28:46 +0200, Sascha Hauer wrote:
> JFFS2 uses kmem_cache_alloc() to allocate an ubifs_inode. The memory
> returned from kmem_cache_alloc() is not zeroed. jffs2_alloc_inode()
> zeroes all fields in the ubifs_inode except the embedded struct inode.
> In Linux this is done in the kmem_cache constructor function which calls
> inode_init_once(). In barebox we have the constructor function as well,
> but we don't have an equivalent of inode_init_once(), so the constructor
> is empty.  zero the inode in the constructor instead so that barebox
> gets a zeroed inode.
> 
> [...]

Applied, thanks!

[2/2] fs: jffs2: zero initialize allocated inode
      https://git.pengutronix.de/cgit/barebox/commit/?id=e6610f524cec (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list