summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLiu Song <liu.song11@zte.com.cn>2018-08-06 04:49:06 +0200
committerRichard Weinberger <richard@nod.at>2019-07-08 19:43:38 +0200
commitd5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47 (patch)
tree23dcd7a0afc21837175a7761c51cd761ab480601 /fs
parentubifs: Correctly use tnc_next() in search_dh_cookie() (diff)
downloadlinux-d5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47.tar.xz
linux-d5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/super.c3
1 files changed, 1 insertions, 2 deletions
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;