ubifs: Simplify redundant code

cbuf's size can be simply assigned.

Signed-off-by: Liu Song <liu.song11@zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Liu Song 2018-08-06 10:49:06 +08:00 committed by Richard Weinberger
parent bacfa94b08
commit d5cf9473a3

View file

@ -1296,8 +1296,7 @@ static int mount_ubifs(struct ubifs_info *c)
if (err)
goto out_free;
sz = ALIGN(c->max_idx_node_sz, c->min_io_size);
sz = ALIGN(sz + c->max_idx_node_sz, c->min_io_size);
sz = ALIGN(c->max_idx_node_sz, c->min_io_size) * 2;
c->cbuf = kmalloc(sz, GFP_NOFS);
if (!c->cbuf) {
err = -ENOMEM;