Skip to content

Commit

Permalink
ubifs: Simplify redundant code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Song authored and Richard Weinberger committed Jul 8, 2019
1 parent bacfa94 commit d5cf947
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5cf947

Please sign in to comment.