aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorhujianyang <hujianyang@huawei.com>2014-06-10 22:42:52 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-07-19 02:53:51 -0400
commitb793a8c8885d87d9867fb2dbfdc1ef7b5877d71b (patch)
tree01da1e3301a8a93f1804b0136440b36eee17ec3c /fs/ubifs
parentce6ebdb87ef94b332fa0bfafd62830bf50e6e2c6 (diff)
UBIFS: remove useless statements
This patch removes useless and duplicate statements. Signed-off-by: hujianyang <hujianyang@huawei.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/lpt.c3
-rw-r--r--fs/ubifs/lpt_commit.c2
-rw-r--r--fs/ubifs/orphan.c1
-rw-r--r--fs/ubifs/sb.c2
-rw-r--r--fs/ubifs/super.c2
-rw-r--r--fs/ubifs/tnc.c1
-rw-r--r--fs/ubifs/tnc_commit.c1
7 files changed, 2 insertions, 10 deletions
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index b4fb422e5b8d..421bd0a80424 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -1464,7 +1464,6 @@ struct ubifs_lprops *ubifs_lpt_lookup(struct ubifs_info *c, int lnum)
1464 return ERR_CAST(nnode); 1464 return ERR_CAST(nnode);
1465 } 1465 }
1466 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); 1466 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
1467 shft -= UBIFS_LPT_FANOUT_SHIFT;
1468 pnode = ubifs_get_pnode(c, nnode, iip); 1467 pnode = ubifs_get_pnode(c, nnode, iip);
1469 if (IS_ERR(pnode)) 1468 if (IS_ERR(pnode))
1470 return ERR_CAST(pnode); 1469 return ERR_CAST(pnode);
@@ -1604,7 +1603,6 @@ struct ubifs_lprops *ubifs_lpt_lookup_dirty(struct ubifs_info *c, int lnum)
1604 return ERR_CAST(nnode); 1603 return ERR_CAST(nnode);
1605 } 1604 }
1606 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); 1605 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
1607 shft -= UBIFS_LPT_FANOUT_SHIFT;
1608 pnode = ubifs_get_pnode(c, nnode, iip); 1606 pnode = ubifs_get_pnode(c, nnode, iip);
1609 if (IS_ERR(pnode)) 1607 if (IS_ERR(pnode))
1610 return ERR_CAST(pnode); 1608 return ERR_CAST(pnode);
@@ -1964,7 +1962,6 @@ again:
1964 } 1962 }
1965 } 1963 }
1966 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1)); 1964 iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
1967 shft -= UBIFS_LPT_FANOUT_SHIFT;
1968 pnode = scan_get_pnode(c, path + h, nnode, iip); 1965 pnode = scan_get_pnode(c, path + h, nnode, iip);
1969 if (IS_ERR(pnode)) { 1966 if (IS_ERR(pnode)) {
1970 err = PTR_ERR(pnode); 1967 err = PTR_ERR(pnode);
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index ff47893ad5fd..d9c02928e992 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -304,7 +304,6 @@ static int layout_cnodes(struct ubifs_info *c)
304 ubifs_assert(lnum >= c->lpt_first && 304 ubifs_assert(lnum >= c->lpt_first &&
305 lnum <= c->lpt_last); 305 lnum <= c->lpt_last);
306 } 306 }
307 done_ltab = 1;
308 c->ltab_lnum = lnum; 307 c->ltab_lnum = lnum;
309 c->ltab_offs = offs; 308 c->ltab_offs = offs;
310 offs += c->ltab_sz; 309 offs += c->ltab_sz;
@@ -514,7 +513,6 @@ static int write_cnodes(struct ubifs_info *c)
514 if (err) 513 if (err)
515 return err; 514 return err;
516 } 515 }
517 done_ltab = 1;
518 ubifs_pack_ltab(c, buf + offs, c->ltab_cmt); 516 ubifs_pack_ltab(c, buf + offs, c->ltab_cmt);
519 offs += c->ltab_sz; 517 offs += c->ltab_sz;
520 dbg_chk_lpt_sz(c, 1, c->ltab_sz); 518 dbg_chk_lpt_sz(c, 1, c->ltab_sz);
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index f1c3e5a1b315..4409f486ecef 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -346,7 +346,6 @@ static int write_orph_nodes(struct ubifs_info *c, int atomic)
346 int lnum; 346 int lnum;
347 347
348 /* Unmap any unused LEBs after consolidation */ 348 /* Unmap any unused LEBs after consolidation */
349 lnum = c->ohead_lnum + 1;
350 for (lnum = c->ohead_lnum + 1; lnum <= c->orph_last; lnum++) { 349 for (lnum = c->ohead_lnum + 1; lnum <= c->orph_last; lnum++) {
351 err = ubifs_leb_unmap(c, lnum); 350 err = ubifs_leb_unmap(c, lnum);
352 if (err) 351 if (err)
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 4c37607a958e..c2c3d13efa1c 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -447,7 +447,7 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup)
447 goto failed; 447 goto failed;
448 } 448 }
449 449
450 if (c->default_compr < 0 || c->default_compr >= UBIFS_COMPR_TYPES_CNT) { 450 if (c->default_compr >= UBIFS_COMPR_TYPES_CNT) {
451 err = 13; 451 err = 13;
452 goto failed; 452 goto failed;
453 } 453 }
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 3904c8574ef9..3b0c2c0b389f 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -75,7 +75,7 @@ static int validate_inode(struct ubifs_info *c, const struct inode *inode)
75 return 1; 75 return 1;
76 } 76 }
77 77
78 if (ui->compr_type < 0 || ui->compr_type >= UBIFS_COMPR_TYPES_CNT) { 78 if (ui->compr_type >= UBIFS_COMPR_TYPES_CNT) {
79 ubifs_err("unknown compression type %d", ui->compr_type); 79 ubifs_err("unknown compression type %d", ui->compr_type);
80 return 2; 80 return 2;
81 } 81 }
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index 8a40cf9c02d7..6793db0754f6 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -3294,7 +3294,6 @@ int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode,
3294 goto out_unlock; 3294 goto out_unlock;
3295 3295
3296 if (err) { 3296 if (err) {
3297 err = -EINVAL;
3298 key = &from_key; 3297 key = &from_key;
3299 goto out_dump; 3298 goto out_dump;
3300 } 3299 }
diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c
index 3600994f8411..7a205e046776 100644
--- a/fs/ubifs/tnc_commit.c
+++ b/fs/ubifs/tnc_commit.c
@@ -389,7 +389,6 @@ static int layout_in_gaps(struct ubifs_info *c, int cnt)
389 ubifs_dump_lprops(c); 389 ubifs_dump_lprops(c);
390 } 390 }
391 /* Try to commit anyway */ 391 /* Try to commit anyway */
392 err = 0;
393 break; 392 break;
394 } 393 }
395 p++; 394 p++;