* [PATCH] bcache: remove redundant LIST_HEAD(journal) from run_cache_set()
@ 2019-04-30 14:02 Coly Li
2019-04-30 14:05 ` Coly Li
0 siblings, 1 reply; 5+ messages in thread
From: Coly Li @ 2019-04-30 14:02 UTC (permalink / raw)
To: axboe; +Cc: linux-bcache, linux-block, juha.aatrokoski, shhuiw, Coly Li
Commit 95f18c9d1310 ("bcache: avoid potential memleak of list of
journal_replay(s) in the CACHE_SYNC branch of run_cache_set") forgets
to remove the original define of LIST_HEAD(journal), which makes
the change no take effect. This patch removes redundant variable
LIST_HEAD(journal) from run_cache_set(), to make Shenghui's fix
working.
Reported-by: Juha Aatrokoski <juha.aatrokoski@aalto.fi>
Cc: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
---
drivers/md/bcache/super.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 0ffe9acee9d8..1b63ac876169 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1800,7 +1800,6 @@ static int run_cache_set(struct cache_set *c)
set_gc_sectors(c);
if (CACHE_SYNC(&c->sb)) {
- LIST_HEAD(journal);
struct bkey *k;
struct jset *j;
--
2.16.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] bcache: remove redundant LIST_HEAD(journal) from run_cache_set()
2019-04-30 14:02 [PATCH] bcache: remove redundant LIST_HEAD(journal) from run_cache_set() Coly Li
@ 2019-04-30 14:05 ` Coly Li
2019-04-30 14:20 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Coly Li @ 2019-04-30 14:05 UTC (permalink / raw)
To: axboe; +Cc: linux-bcache, linux-block, juha.aatrokoski, shhuiw
On 2019/4/30 10:02 下午, Coly Li wrote:
> Commit 95f18c9d1310 ("bcache: avoid potential memleak of list of
> journal_replay(s) in the CACHE_SYNC branch of run_cache_set") forgets
> to remove the original define of LIST_HEAD(journal), which makes
> the change no take effect. This patch removes redundant variable
> LIST_HEAD(journal) from run_cache_set(), to make Shenghui's fix
> working.
>
> Reported-by: Juha Aatrokoski <juha.aatrokoski@aalto.fi>
> Cc: Shenghui Wang <shhuiw@foxmail.com>
> Signed-off-by: Coly Li <colyli@suse.de>
> ---
> drivers/md/bcache/super.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index 0ffe9acee9d8..1b63ac876169 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -1800,7 +1800,6 @@ static int run_cache_set(struct cache_set *c)
> set_gc_sectors(c);
>
> if (CACHE_SYNC(&c->sb)) {
> - LIST_HEAD(journal);
> struct bkey *k;
> struct jset *j;
>
>
Hi Jens,
Please take this fix for the Linux v5.2 bcache series. It fixes a
problem from
[PATCH 18/18] bcache: avoid potential memleak of list of
journal_replay(s) in the CACHE_SYNC branch of run_cache_set
which is already in your for-next branch.
Thanks to Juha for cache this bug, and thank you in advance for taking
care of this.
--
Coly Li
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bcache: remove redundant LIST_HEAD(journal) from run_cache_set()
2019-04-30 14:05 ` Coly Li
@ 2019-04-30 14:20 ` Jens Axboe
2019-05-01 6:43 ` Coly Li
0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2019-04-30 14:20 UTC (permalink / raw)
To: Coly Li; +Cc: linux-bcache, linux-block, juha.aatrokoski, shhuiw
On 4/30/19 8:05 AM, Coly Li wrote:
> On 2019/4/30 10:02 下午, Coly Li wrote:
>> Commit 95f18c9d1310 ("bcache: avoid potential memleak of list of
>> journal_replay(s) in the CACHE_SYNC branch of run_cache_set") forgets
>> to remove the original define of LIST_HEAD(journal), which makes
>> the change no take effect. This patch removes redundant variable
>> LIST_HEAD(journal) from run_cache_set(), to make Shenghui's fix
>> working.
>>
>> Reported-by: Juha Aatrokoski <juha.aatrokoski@aalto.fi>
>> Cc: Shenghui Wang <shhuiw@foxmail.com>
>> Signed-off-by: Coly Li <colyli@suse.de>
>> ---
>> drivers/md/bcache/super.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
>> index 0ffe9acee9d8..1b63ac876169 100644
>> --- a/drivers/md/bcache/super.c
>> +++ b/drivers/md/bcache/super.c
>> @@ -1800,7 +1800,6 @@ static int run_cache_set(struct cache_set *c)
>> set_gc_sectors(c);
>>
>> if (CACHE_SYNC(&c->sb)) {
>> - LIST_HEAD(journal);
>> struct bkey *k;
>> struct jset *j;
>>
>>
>
> Hi Jens,
>
> Please take this fix for the Linux v5.2 bcache series. It fixes a
> problem from
> [PATCH 18/18] bcache: avoid potential memleak of list of
> journal_replay(s) in the CACHE_SYNC branch of run_cache_set
> which is already in your for-next branch.
>
> Thanks to Juha for cache this bug, and thank you in advance for taking
> care of this.
Applied, but please add Fixes: lines patches like that, it's not enough
to simply mention it in the commit message.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bcache: remove redundant LIST_HEAD(journal) from run_cache_set()
2019-04-30 14:20 ` Jens Axboe
@ 2019-05-01 6:43 ` Coly Li
2019-05-01 12:35 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Coly Li @ 2019-05-01 6:43 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-bcache, linux-block, juha.aatrokoski, shhuiw
On 2019/4/30 10:20 下午, Jens Axboe wrote:
> On 4/30/19 8:05 AM, Coly Li wrote:
>> On 2019/4/30 10:02 下午, Coly Li wrote:
>>> Commit 95f18c9d1310 ("bcache: avoid potential memleak of list of
>>> journal_replay(s) in the CACHE_SYNC branch of run_cache_set") forgets
>>> to remove the original define of LIST_HEAD(journal), which makes
>>> the change no take effect. This patch removes redundant variable
>>> LIST_HEAD(journal) from run_cache_set(), to make Shenghui's fix
>>> working.
>>>
>>> Reported-by: Juha Aatrokoski <juha.aatrokoski@aalto.fi>
>>> Cc: Shenghui Wang <shhuiw@foxmail.com>
>>> Signed-off-by: Coly Li <colyli@suse.de>
>>> ---
>>> drivers/md/bcache/super.c | 1 -
>>> 1 file changed, 1 deletion(-)
>>>
>>> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
>>> index 0ffe9acee9d8..1b63ac876169 100644
>>> --- a/drivers/md/bcache/super.c
>>> +++ b/drivers/md/bcache/super.c
>>> @@ -1800,7 +1800,6 @@ static int run_cache_set(struct cache_set *c)
>>> set_gc_sectors(c);
>>>
>>> if (CACHE_SYNC(&c->sb)) {
>>> - LIST_HEAD(journal);
>>> struct bkey *k;
>>> struct jset *j;
>>>
>>>
>>
>> Hi Jens,
>>
>> Please take this fix for the Linux v5.2 bcache series. It fixes a
>> problem from
>> [PATCH 18/18] bcache: avoid potential memleak of list of
>> journal_replay(s) in the CACHE_SYNC branch of run_cache_set
>> which is already in your for-next branch.
>>
>> Thanks to Juha for cache this bug, and thank you in advance for taking
>> care of this.
>
> Applied, but please add Fixes: lines patches like that, it's not enough
> to simply mention it in the commit message.
>
I just re-send a V2 patch with adding the Fixes: line, thanks for taking
care of this.
--
Coly Li
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bcache: remove redundant LIST_HEAD(journal) from run_cache_set()
2019-05-01 6:43 ` Coly Li
@ 2019-05-01 12:35 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2019-05-01 12:35 UTC (permalink / raw)
To: Coly Li; +Cc: linux-bcache, linux-block, juha.aatrokoski, shhuiw
On 5/1/19 12:43 AM, Coly Li wrote:
> On 2019/4/30 10:20 下午, Jens Axboe wrote:
>> On 4/30/19 8:05 AM, Coly Li wrote:
>>> On 2019/4/30 10:02 下午, Coly Li wrote:
>>>> Commit 95f18c9d1310 ("bcache: avoid potential memleak of list of
>>>> journal_replay(s) in the CACHE_SYNC branch of run_cache_set") forgets
>>>> to remove the original define of LIST_HEAD(journal), which makes
>>>> the change no take effect. This patch removes redundant variable
>>>> LIST_HEAD(journal) from run_cache_set(), to make Shenghui's fix
>>>> working.
>>>>
>>>> Reported-by: Juha Aatrokoski <juha.aatrokoski@aalto.fi>
>>>> Cc: Shenghui Wang <shhuiw@foxmail.com>
>>>> Signed-off-by: Coly Li <colyli@suse.de>
>>>> ---
>>>> drivers/md/bcache/super.c | 1 -
>>>> 1 file changed, 1 deletion(-)
>>>>
>>>> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
>>>> index 0ffe9acee9d8..1b63ac876169 100644
>>>> --- a/drivers/md/bcache/super.c
>>>> +++ b/drivers/md/bcache/super.c
>>>> @@ -1800,7 +1800,6 @@ static int run_cache_set(struct cache_set *c)
>>>> set_gc_sectors(c);
>>>>
>>>> if (CACHE_SYNC(&c->sb)) {
>>>> - LIST_HEAD(journal);
>>>> struct bkey *k;
>>>> struct jset *j;
>>>>
>>>>
>>>
>>> Hi Jens,
>>>
>>> Please take this fix for the Linux v5.2 bcache series. It fixes a
>>> problem from
>>> [PATCH 18/18] bcache: avoid potential memleak of list of
>>> journal_replay(s) in the CACHE_SYNC branch of run_cache_set
>>> which is already in your for-next branch.
>>>
>>> Thanks to Juha for cache this bug, and thank you in advance for taking
>>> care of this.
>>
>> Applied, but please add Fixes: lines patches like that, it's not enough
>> to simply mention it in the commit message.
>>
>
> I just re-send a V2 patch with adding the Fixes: line, thanks for taking
> care of this.
As I wrote, I already applied it and added the Fixes tag. Just a note
for future patches.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-05-01 12:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 14:02 [PATCH] bcache: remove redundant LIST_HEAD(journal) from run_cache_set() Coly Li
2019-04-30 14:05 ` Coly Li
2019-04-30 14:20 ` Jens Axboe
2019-05-01 6:43 ` Coly Li
2019-05-01 12:35 ` Jens Axboe
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.