summaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorLiu Song <liu.song11@zte.com.cn>2018-08-06 05:49:06 +0300
committerRichard Weinberger <richard@nod.at>2019-07-08 20:43:38 +0300
commitd5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47 (patch)
tree23dcd7a0afc21837175a7761c51cd761ab480601 /fs/ubifs
parentbacfa94b08027b9f66ede7044972e3b066766b3e (diff)
downloadlinux-d5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47.tar.xz
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/ubifs')
-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;