diff options
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/compress.c | 2 | ||||
-rw-r--r-- | fs/f2fs/data.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 53f1e3061b23..14262e0f1cd6 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -157,7 +157,7 @@ struct page *f2fs_compress_control_page(struct page *page) int f2fs_init_compress_ctx(struct compress_ctx *cc) { - if (cc->nr_rpages) + if (cc->rpages) return 0; cc->rpages = page_array_alloc(cc->inode, cc->cluster_size); diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index db020a74fd84..ee87407602fa 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3129,6 +3129,8 @@ next: retry = 0; } } + if (f2fs_compressed_file(inode)) + f2fs_destroy_compress_ctx(&cc); #endif if (retry) { index = 0; |