diff options
author | Liu Song <liu.song11@zte.com.cn> | 2018-08-06 10:49:06 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-07-08 19:43:38 +0200 |
commit | d5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47 (patch) | |
tree | 23dcd7a0afc21837175a7761c51cd761ab480601 /fs/ubifs | |
parent | bacfa94b08027b9f66ede7044972e3b066766b3e (diff) | |
download | linux-d5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47.tar.bz2 |
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.c | 3 |
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; |