From d5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47 Mon Sep 17 00:00:00 2001 From: Liu Song Date: Mon, 6 Aug 2018 10:49:06 +0800 Subject: ubifs: Simplify redundant code cbuf's size can be simply assigned. Signed-off-by: Liu Song Reviewed-by: Jiang Biao Signed-off-by: Richard Weinberger --- fs/ubifs/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs') diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 6cfc494050be..af683734bbdd 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -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; -- cgit v1.2.3