Commit 376207af authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: compress: remove unneeded code

- f2fs_write_multi_pages
 - f2fs_compress_pages
  - init_compress_ctx
  - compress_pages
  - destroy_compress_ctx  --- 1
 - f2fs_write_compressed_pages
 - destroy_compress_ctx  --- 2

destroy_compress_ctx() in f2fs_write_multi_pages() is redundant, remove
it.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent e90027d2
...@@ -1388,9 +1388,6 @@ int f2fs_write_multi_pages(struct compress_ctx *cc, ...@@ -1388,9 +1388,6 @@ int f2fs_write_multi_pages(struct compress_ctx *cc,
struct writeback_control *wbc, struct writeback_control *wbc,
enum iostat_type io_type) enum iostat_type io_type)
{ {
struct f2fs_inode_info *fi = F2FS_I(cc->inode);
const struct f2fs_compress_ops *cops =
f2fs_cops[fi->i_compress_algorithm];
int err; int err;
*submitted = 0; *submitted = 0;
...@@ -1405,7 +1402,6 @@ int f2fs_write_multi_pages(struct compress_ctx *cc, ...@@ -1405,7 +1402,6 @@ int f2fs_write_multi_pages(struct compress_ctx *cc,
err = f2fs_write_compressed_pages(cc, submitted, err = f2fs_write_compressed_pages(cc, submitted,
wbc, io_type); wbc, io_type);
cops->destroy_compress_ctx(cc);
kfree(cc->cpages); kfree(cc->cpages);
cc->cpages = NULL; cc->cpages = NULL;
if (!err) if (!err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment