aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/sb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/sb.c')
-rw-r--r--fs/ubifs/sb.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index a880d0c152e5..ef3d1ba6d992 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -194,7 +194,7 @@ static int create_default_filesystem(struct ubifs_info *c)
194 sup->rp_size = cpu_to_le64(tmp64); 194 sup->rp_size = cpu_to_le64(tmp64);
195 sup->ro_compat_version = cpu_to_le32(UBIFS_RO_COMPAT_VERSION); 195 sup->ro_compat_version = cpu_to_le32(UBIFS_RO_COMPAT_VERSION);
196 196
197 err = ubifs_write_node(c, sup, UBIFS_SB_NODE_SZ, 0, 0, UBI_LONGTERM); 197 err = ubifs_write_node(c, sup, UBIFS_SB_NODE_SZ, 0, 0);
198 kfree(sup); 198 kfree(sup);
199 if (err) 199 if (err)
200 return err; 200 return err;
@@ -250,14 +250,13 @@ static int create_default_filesystem(struct ubifs_info *c)
250 250
251 mst->total_used = cpu_to_le64(UBIFS_INO_NODE_SZ); 251 mst->total_used = cpu_to_le64(UBIFS_INO_NODE_SZ);
252 252
253 err = ubifs_write_node(c, mst, UBIFS_MST_NODE_SZ, UBIFS_MST_LNUM, 0, 253 err = ubifs_write_node(c, mst, UBIFS_MST_NODE_SZ, UBIFS_MST_LNUM, 0);
254 UBI_UNKNOWN);
255 if (err) { 254 if (err) {
256 kfree(mst); 255 kfree(mst);
257 return err; 256 return err;
258 } 257 }
259 err = ubifs_write_node(c, mst, UBIFS_MST_NODE_SZ, UBIFS_MST_LNUM + 1, 0, 258 err = ubifs_write_node(c, mst, UBIFS_MST_NODE_SZ, UBIFS_MST_LNUM + 1,
260 UBI_UNKNOWN); 259 0);
261 kfree(mst); 260 kfree(mst);
262 if (err) 261 if (err)
263 return err; 262 return err;
@@ -280,8 +279,7 @@ static int create_default_filesystem(struct ubifs_info *c)
280 key_write_idx(c, &key, &br->key); 279 key_write_idx(c, &key, &br->key);
281 br->lnum = cpu_to_le32(main_first + DEFAULT_DATA_LEB); 280 br->lnum = cpu_to_le32(main_first + DEFAULT_DATA_LEB);
282 br->len = cpu_to_le32(UBIFS_INO_NODE_SZ); 281 br->len = cpu_to_le32(UBIFS_INO_NODE_SZ);
283 err = ubifs_write_node(c, idx, tmp, main_first + DEFAULT_IDX_LEB, 0, 282 err = ubifs_write_node(c, idx, tmp, main_first + DEFAULT_IDX_LEB, 0);
284 UBI_UNKNOWN);
285 kfree(idx); 283 kfree(idx);
286 if (err) 284 if (err)
287 return err; 285 return err;
@@ -313,8 +311,7 @@ static int create_default_filesystem(struct ubifs_info *c)
313 ino->flags = cpu_to_le32(UBIFS_COMPR_FL); 311 ino->flags = cpu_to_le32(UBIFS_COMPR_FL);
314 312
315 err = ubifs_write_node(c, ino, UBIFS_INO_NODE_SZ, 313 err = ubifs_write_node(c, ino, UBIFS_INO_NODE_SZ,
316 main_first + DEFAULT_DATA_LEB, 0, 314 main_first + DEFAULT_DATA_LEB, 0);
317 UBI_UNKNOWN);
318 kfree(ino); 315 kfree(ino);
319 if (err) 316 if (err)
320 return err; 317 return err;
@@ -333,8 +330,7 @@ static int create_default_filesystem(struct ubifs_info *c)
333 return -ENOMEM; 330 return -ENOMEM;
334 331
335 cs->ch.node_type = UBIFS_CS_NODE; 332 cs->ch.node_type = UBIFS_CS_NODE;
336 err = ubifs_write_node(c, cs, UBIFS_CS_NODE_SZ, UBIFS_LOG_LNUM, 333 err = ubifs_write_node(c, cs, UBIFS_CS_NODE_SZ, UBIFS_LOG_LNUM, 0);
337 0, UBI_UNKNOWN);
338 kfree(cs); 334 kfree(cs);
339 335
340 ubifs_msg("default file-system created"); 336 ubifs_msg("default file-system created");
@@ -516,7 +512,7 @@ int ubifs_write_sb_node(struct ubifs_info *c, struct ubifs_sb_node *sup)
516 int len = ALIGN(UBIFS_SB_NODE_SZ, c->min_io_size); 512 int len = ALIGN(UBIFS_SB_NODE_SZ, c->min_io_size);
517 513
518 ubifs_prepare_node(c, sup, UBIFS_SB_NODE_SZ, 1); 514 ubifs_prepare_node(c, sup, UBIFS_SB_NODE_SZ, 1);
519 return ubifs_leb_change(c, UBIFS_SB_LNUM, sup, len, UBI_LONGTERM); 515 return ubifs_leb_change(c, UBIFS_SB_LNUM, sup, len);
520} 516}
521 517
522/** 518/**
@@ -689,7 +685,7 @@ static int fixup_leb(struct ubifs_info *c, int lnum, int len)
689 if (err) 685 if (err)
690 return err; 686 return err;
691 687
692 return ubifs_leb_change(c, lnum, c->sbuf, len, UBI_UNKNOWN); 688 return ubifs_leb_change(c, lnum, c->sbuf, len);
693} 689}
694 690
695/** 691/**