Commit d5cf9473 authored by Liu Song's avatar Liu Song Committed by Richard Weinberger

ubifs: Simplify redundant code

cbuf's size can be simply assigned.
Signed-off-by: default avatarLiu Song <liu.song11@zte.com.cn>
Reviewed-by: default avatarJiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent bacfa94b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment