Skip to contentSkip to conversation

bcache: remove redundant LIST_HEAD(journal) from run_cache_set()

PATCH Applied Coly Li 2 participants 5 messages Apr 30, 2019 – May 1, 2019

Subsystems (2)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Coly Li

author
#0 lore raw

PATCH 1/1 bcache: remove redundant LIST_HEAD(journal) from run_cache_set()

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.

---
 drivers/md/bcache/super.c | 1 -
 1 file changed, 1 deletion(-)
drivers/md/bcache/super.c +0 -1
index 0ffe9acee9d8..1b63ac876169 100644
@@ -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;
 
Signature · 1 line
2.16.4
author
#1 lore raw
Quoted 20 lines · 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.

---
 drivers/md/bcache/super.c | 1 -
 1 file changed, 1 deletion(-)
drivers/md/bcache/super.c +0 -0
index 0ffe9acee9d8..1b63ac876169 100644

drivers/md/bcache/super.c static int run_cache_set(struct cache_set *c) · line 1805

Quoted 7 lines
drivers/md/bcache/super.c +0 -1
@@ -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.

Signature · 1 line
Coly Li
maintainer Applied
#2 lore raw
Quoted 31 lines · Coly Li
Quoted 20 lines · 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.

---
 drivers/md/bcache/super.c | 1 -
 1 file changed, 1 deletion(-)
drivers/md/bcache/super.c +0 -0
index 0ffe9acee9d8..1b63ac876169 100644

drivers/md/bcache/super.c static int run_cache_set(struct cache_set *c) · line 1805

Quoted 7 lines
drivers/md/bcache/super.c +0 -1
@@ -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,

Quoted 8 lines

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.

Signature · 1 line
Jens Axboe
author
#3 lore raw
Quoted 38 lines · Jens Axboe
Quoted 37 lines · Coly Li
Quoted 20 lines · 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.

---
 drivers/md/bcache/super.c | 1 -
 1 file changed, 1 deletion(-)
drivers/md/bcache/super.c +0 -0
index 0ffe9acee9d8..1b63ac876169 100644

drivers/md/bcache/super.c static int run_cache_set(struct cache_set *c) · line 1805

Quoted 7 lines
drivers/md/bcache/super.c +0 -1
@@ -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.

Quoted 6 lines
Quoted 2 lines

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.

Signature · 1 line
Coly Li
maintainer
#4 lore raw
Quoted 42 lines · Coly Li
Quoted 41 lines · Jens Axboe
Quoted 39 lines · Coly Li
Quoted 20 lines · 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.

---
 drivers/md/bcache/super.c | 1 -
 1 file changed, 1 deletion(-)
drivers/md/bcache/super.c +0 -0
index 0ffe9acee9d8..1b63ac876169 100644

drivers/md/bcache/super.c static int run_cache_set(struct cache_set *c) · line 1805

Quoted 7 lines
drivers/md/bcache/super.c +0 -1
@@ -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.

Quoted 6 lines
Quoted 3 lines

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.

Signature · 1 line
Jens Axboe