2020-01-06 08:03:15

by Chao Yu

[permalink] [raw]
Subject: [PATCH 2/4] f2fs: compress: revert error path fix

Revert incorrect fix in ("TEMP: f2fs: support data compression - fix1")

Signed-off-by: Chao Yu <[email protected]>
---
fs/f2fs/compress.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index f993b4ce1970..fc4510729654 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -601,7 +601,7 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
fgp_flag, GFP_NOFS);
if (!page) {
ret = -ENOMEM;
- goto release_pages;
+ goto unlock_pages;
}

if (PageUptodate(page))
@@ -616,13 +616,13 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
ret = f2fs_read_multi_pages(cc, &bio, cc->cluster_size,
&last_block_in_bio, false);
if (ret)
- goto unlock_pages;
+ goto release_pages;
if (bio)
f2fs_submit_bio(sbi, bio, DATA);

ret = f2fs_init_compress_ctx(cc);
if (ret)
- goto unlock_pages;
+ goto release_pages;
}

for (i = 0; i < cc->cluster_size; i++) {
--
2.18.0.rc1


2020-01-06 19:27:43

by Jaegeuk Kim

[permalink] [raw]
Subject: Re: [PATCH 2/4] f2fs: compress: revert error path fix

Hi Chao,

Could you please check this out?
https://github.com/jaegeuk/f2fs/commits/g-dev-test

Thanks,

On 01/06, Chao Yu wrote:
> Revert incorrect fix in ("TEMP: f2fs: support data compression - fix1")
>
> Signed-off-by: Chao Yu <[email protected]>
> ---
> fs/f2fs/compress.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
> index f993b4ce1970..fc4510729654 100644
> --- a/fs/f2fs/compress.c
> +++ b/fs/f2fs/compress.c
> @@ -601,7 +601,7 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
> fgp_flag, GFP_NOFS);
> if (!page) {
> ret = -ENOMEM;
> - goto release_pages;
> + goto unlock_pages;
> }
>
> if (PageUptodate(page))
> @@ -616,13 +616,13 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
> ret = f2fs_read_multi_pages(cc, &bio, cc->cluster_size,
> &last_block_in_bio, false);
> if (ret)
> - goto unlock_pages;
> + goto release_pages;
> if (bio)
> f2fs_submit_bio(sbi, bio, DATA);
>
> ret = f2fs_init_compress_ctx(cc);
> if (ret)
> - goto unlock_pages;
> + goto release_pages;
> }
>
> for (i = 0; i < cc->cluster_size; i++) {
> --
> 2.18.0.rc1

2020-01-08 10:48:47

by Chao Yu

[permalink] [raw]
Subject: Re: [PATCH 2/4] f2fs: compress: revert error path fix

On 2020/1/7 3:26, Jaegeuk Kim wrote:
> Hi Chao,
>
> Could you please check this out?
> https://github.com/jaegeuk/f2fs/commits/g-dev-test

Looks good to me, I add some minor comments on github.

Any comments on below thread?

Re: [f2fs-dev] [PATCH 3/4] f2fs: compress: fix error path in prepare_compress_overwrite()

Thanks,

>
> Thanks,
>
> On 01/06, Chao Yu wrote:
>> Revert incorrect fix in ("TEMP: f2fs: support data compression - fix1")
>>
>> Signed-off-by: Chao Yu <[email protected]>
>> ---
>> fs/f2fs/compress.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
>> index f993b4ce1970..fc4510729654 100644
>> --- a/fs/f2fs/compress.c
>> +++ b/fs/f2fs/compress.c
>> @@ -601,7 +601,7 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
>> fgp_flag, GFP_NOFS);
>> if (!page) {
>> ret = -ENOMEM;
>> - goto release_pages;
>> + goto unlock_pages;
>> }
>>
>> if (PageUptodate(page))
>> @@ -616,13 +616,13 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
>> ret = f2fs_read_multi_pages(cc, &bio, cc->cluster_size,
>> &last_block_in_bio, false);
>> if (ret)
>> - goto unlock_pages;
>> + goto release_pages;
>> if (bio)
>> f2fs_submit_bio(sbi, bio, DATA);
>>
>> ret = f2fs_init_compress_ctx(cc);
>> if (ret)
>> - goto unlock_pages;
>> + goto release_pages;
>> }
>>
>> for (i = 0; i < cc->cluster_size; i++) {
>> --
>> 2.18.0.rc1
> .
>