summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/sb.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-09-07 14:36:41 +0200
committerRichard Weinberger <richard@nod.at>2018-10-23 13:48:56 +0200
commitb5b1f08369222394540fb4b3b947fe26a2557d1d (patch)
tree58b94ec0ca6804ea7006f0fc1ed89d04b9559b94 /fs/ubifs/sb.c
parent625700ccb5069ec81d15aae3b47282ecc59d63b5 (diff)
downloadlinux-b5b1f08369222394540fb4b3b947fe26a2557d1d.tar.gz
linux-b5b1f08369222394540fb4b3b947fe26a2557d1d.tar.bz2
linux-b5b1f08369222394540fb4b3b947fe26a2557d1d.zip
ubifs: Create hash for default LPT
During creation of the default filesystem on an empty flash the default LPT is created. With this patch a hash over the default LPT is calculated which can be added to the default filesystems master node. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/sb.c')
-rw-r--r--fs/ubifs/sb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 7e08c8143316..572756579532 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -87,6 +87,7 @@ static int create_default_filesystem(struct ubifs_info *c)
__le64 tmp_le64;
__le32 tmp_le32;
struct timespec64 ts;
+ u8 hash_lpt[UBIFS_HASH_ARR_SZ];
/* Some functions called from here depend on the @c->key_len filed */
c->key_len = UBIFS_SK_LEN;
@@ -148,7 +149,7 @@ static int create_default_filesystem(struct ubifs_info *c)
c->lsave_cnt = DEFAULT_LSAVE_CNT;
c->max_leb_cnt = c->leb_cnt;
err = ubifs_create_dflt_lpt(c, &main_lebs, lpt_first, &lpt_lebs,
- &big_lpt);
+ &big_lpt, hash_lpt);
if (err)
return err;