mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-18 12:46:50 +00:00
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>
This commit is contained in:
parent
ce6ebdb87e
commit
b793a8c888
7 changed files with 2 additions and 10 deletions
|
|
@ -1464,7 +1464,6 @@ struct ubifs_lprops *ubifs_lpt_lookup(struct ubifs_info *c, int lnum)
|
||||||
return ERR_CAST(nnode);
|
return ERR_CAST(nnode);
|
||||||
}
|
}
|
||||||
iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
|
iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
|
||||||
shft -= UBIFS_LPT_FANOUT_SHIFT;
|
|
||||||
pnode = ubifs_get_pnode(c, nnode, iip);
|
pnode = ubifs_get_pnode(c, nnode, iip);
|
||||||
if (IS_ERR(pnode))
|
if (IS_ERR(pnode))
|
||||||
return ERR_CAST(pnode);
|
return ERR_CAST(pnode);
|
||||||
|
|
@ -1604,7 +1603,6 @@ struct ubifs_lprops *ubifs_lpt_lookup_dirty(struct ubifs_info *c, int lnum)
|
||||||
return ERR_CAST(nnode);
|
return ERR_CAST(nnode);
|
||||||
}
|
}
|
||||||
iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
|
iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
|
||||||
shft -= UBIFS_LPT_FANOUT_SHIFT;
|
|
||||||
pnode = ubifs_get_pnode(c, nnode, iip);
|
pnode = ubifs_get_pnode(c, nnode, iip);
|
||||||
if (IS_ERR(pnode))
|
if (IS_ERR(pnode))
|
||||||
return ERR_CAST(pnode);
|
return ERR_CAST(pnode);
|
||||||
|
|
@ -1964,7 +1962,6 @@ again:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
|
iip = ((i >> shft) & (UBIFS_LPT_FANOUT - 1));
|
||||||
shft -= UBIFS_LPT_FANOUT_SHIFT;
|
|
||||||
pnode = scan_get_pnode(c, path + h, nnode, iip);
|
pnode = scan_get_pnode(c, path + h, nnode, iip);
|
||||||
if (IS_ERR(pnode)) {
|
if (IS_ERR(pnode)) {
|
||||||
err = PTR_ERR(pnode);
|
err = PTR_ERR(pnode);
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,6 @@ static int layout_cnodes(struct ubifs_info *c)
|
||||||
ubifs_assert(lnum >= c->lpt_first &&
|
ubifs_assert(lnum >= c->lpt_first &&
|
||||||
lnum <= c->lpt_last);
|
lnum <= c->lpt_last);
|
||||||
}
|
}
|
||||||
done_ltab = 1;
|
|
||||||
c->ltab_lnum = lnum;
|
c->ltab_lnum = lnum;
|
||||||
c->ltab_offs = offs;
|
c->ltab_offs = offs;
|
||||||
offs += c->ltab_sz;
|
offs += c->ltab_sz;
|
||||||
|
|
@ -514,7 +513,6 @@ static int write_cnodes(struct ubifs_info *c)
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
done_ltab = 1;
|
|
||||||
ubifs_pack_ltab(c, buf + offs, c->ltab_cmt);
|
ubifs_pack_ltab(c, buf + offs, c->ltab_cmt);
|
||||||
offs += c->ltab_sz;
|
offs += c->ltab_sz;
|
||||||
dbg_chk_lpt_sz(c, 1, c->ltab_sz);
|
dbg_chk_lpt_sz(c, 1, c->ltab_sz);
|
||||||
|
|
|
||||||
|
|
@ -346,7 +346,6 @@ static int write_orph_nodes(struct ubifs_info *c, int atomic)
|
||||||
int lnum;
|
int lnum;
|
||||||
|
|
||||||
/* Unmap any unused LEBs after consolidation */
|
/* Unmap any unused LEBs after consolidation */
|
||||||
lnum = c->ohead_lnum + 1;
|
|
||||||
for (lnum = c->ohead_lnum + 1; lnum <= c->orph_last; lnum++) {
|
for (lnum = c->ohead_lnum + 1; lnum <= c->orph_last; lnum++) {
|
||||||
err = ubifs_leb_unmap(c, lnum);
|
err = ubifs_leb_unmap(c, lnum);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup)
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->default_compr < 0 || c->default_compr >= UBIFS_COMPR_TYPES_CNT) {
|
if (c->default_compr >= UBIFS_COMPR_TYPES_CNT) {
|
||||||
err = 13;
|
err = 13;
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ static int validate_inode(struct ubifs_info *c, const struct inode *inode)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ui->compr_type < 0 || ui->compr_type >= UBIFS_COMPR_TYPES_CNT) {
|
if (ui->compr_type >= UBIFS_COMPR_TYPES_CNT) {
|
||||||
ubifs_err("unknown compression type %d", ui->compr_type);
|
ubifs_err("unknown compression type %d", ui->compr_type);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3294,7 +3294,6 @@ int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode,
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
err = -EINVAL;
|
|
||||||
key = &from_key;
|
key = &from_key;
|
||||||
goto out_dump;
|
goto out_dump;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -389,7 +389,6 @@ static int layout_in_gaps(struct ubifs_info *c, int cnt)
|
||||||
ubifs_dump_lprops(c);
|
ubifs_dump_lprops(c);
|
||||||
}
|
}
|
||||||
/* Try to commit anyway */
|
/* Try to commit anyway */
|
||||||
err = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue