All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: <linux-f2fs-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>, <chao@kernel.org>
Subject: Re: [PATCH 1/3] f2fs: compress: fix to call f2fs_put_dnode() paired with f2fs_get_block()
Date: Tue, 11 May 2021 09:37:34 +0800	[thread overview]
Message-ID: <b45c381e-45e7-037d-c71c-77c73fdaae8a@huawei.com> (raw)
In-Reply-To: <YJlWaOSZNLkdGNnQ@google.com>

On 2021/5/10 23:51, Jaegeuk Kim wrote:
> On 05/10, Chao Yu wrote:
>> f2fs_get_block() and f2fs_put_dnode() should be called as a pair,
>> add missing f2fs_put_dnode() in prepare_compress_overwrite().
>>
>> Fixes: 4c8ff7095bef ("f2fs: support data compression")
>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>> ---
>>   fs/f2fs/compress.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
>> index c208563eac28..d5cb0ba9a0e1 100644
>> --- a/fs/f2fs/compress.c
>> +++ b/fs/f2fs/compress.c
>> @@ -1088,6 +1088,7 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
>>   
>>   		for (i = cc->cluster_size - 1; i > 0; i--) {
>>   			ret = f2fs_get_block(&dn, start_idx + i);
>> +			f2fs_put_dnode(&dn);
> 
> f2fs_reserve_block()
>   -> need_put = true;
>    -> f2fs_put_dnode();

Correct, it looks f2fs_vm_page_mkwrite() doesn't need to call
f2fs_put_dnode() as well.

Thanks,

> 
>>   			if (ret) {
>>   				i = cc->cluster_size;
>>   				break;
>> -- 
>> 2.29.2
> .
> 

WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 1/3] f2fs: compress: fix to call f2fs_put_dnode() paired with f2fs_get_block()
Date: Tue, 11 May 2021 09:37:34 +0800	[thread overview]
Message-ID: <b45c381e-45e7-037d-c71c-77c73fdaae8a@huawei.com> (raw)
In-Reply-To: <YJlWaOSZNLkdGNnQ@google.com>

On 2021/5/10 23:51, Jaegeuk Kim wrote:
> On 05/10, Chao Yu wrote:
>> f2fs_get_block() and f2fs_put_dnode() should be called as a pair,
>> add missing f2fs_put_dnode() in prepare_compress_overwrite().
>>
>> Fixes: 4c8ff7095bef ("f2fs: support data compression")
>> Signed-off-by: Chao Yu <yuchao0@huawei.com>
>> ---
>>   fs/f2fs/compress.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
>> index c208563eac28..d5cb0ba9a0e1 100644
>> --- a/fs/f2fs/compress.c
>> +++ b/fs/f2fs/compress.c
>> @@ -1088,6 +1088,7 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
>>   
>>   		for (i = cc->cluster_size - 1; i > 0; i--) {
>>   			ret = f2fs_get_block(&dn, start_idx + i);
>> +			f2fs_put_dnode(&dn);
> 
> f2fs_reserve_block()
>   -> need_put = true;
>    -> f2fs_put_dnode();

Correct, it looks f2fs_vm_page_mkwrite() doesn't need to call
f2fs_put_dnode() as well.

Thanks,

> 
>>   			if (ret) {
>>   				i = cc->cluster_size;
>>   				break;
>> -- 
>> 2.29.2
> .
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2021-05-11  1:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10  9:30 [PATCH 1/3] f2fs: compress: fix to call f2fs_put_dnode() paired with f2fs_get_block() Chao Yu
2021-05-10  9:30 ` [f2fs-dev] " Chao Yu
2021-05-10  9:30 ` [PATCH 2/3] f2fs: compress: fix race condition of overwrite vs truncate Chao Yu
2021-05-10  9:30   ` [f2fs-dev] " Chao Yu
2021-05-10  9:30 ` [PATCH 3/3] f2fs: compress: fix to assign cc.cluster_idx correctly Chao Yu
2021-05-10  9:30   ` [f2fs-dev] " Chao Yu
2021-05-10 16:09   ` Jaegeuk Kim
2021-05-10 16:09     ` [f2fs-dev] " Jaegeuk Kim
2021-05-11  1:38     ` Chao Yu
2021-05-11  1:38       ` [f2fs-dev] " Chao Yu
2021-05-10 15:51 ` [PATCH 1/3] f2fs: compress: fix to call f2fs_put_dnode() paired with f2fs_get_block() Jaegeuk Kim
2021-05-10 15:51   ` [f2fs-dev] " Jaegeuk Kim
2021-05-11  1:37   ` Chao Yu [this message]
2021-05-11  1:37     ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b45c381e-45e7-037d-c71c-77c73fdaae8a@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.