ubifs: Refactor create_default_filesystem()
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 7 Sep 2018 12:36:23 +0000 (14:36 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 23 Oct 2018 11:48:06 +0000 (13:48 +0200)
commitc4de6d7e4319ffb52d6db3138057712749540191
tree24ece70ae4e0bd90695783a09e36a57017091fd1
parent7e5583fd77194b45eef04835576a4fe7f3f235c8
ubifs: Refactor create_default_filesystem()

create_default_filesystem() allocates memory for a node, writes that
node and frees the memory directly afterwards. With this patch we
allocate memory for all nodes at the beginning of the function and
free the memory at the end. This makes it easier to implement
authentication support since with authentication support we'll need
the contents of some nodes when creating other nodes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/sb.c