Skip to contentSkip to conversation

f2fs: init dirty_secmap incorrectly

PATCH In review Jack Qiu 2 participants 2 messages Nov 30, 2020

Subsystems (2)
lore
Share & tools
lore

Jack Qiu

author
#0 lore raw

PATCH 1/1 f2fs: init dirty_secmap incorrectly

section is dirty, but dirty_secmap may not set

Fixes da52f8ade40b ("f2fs: get the right gc victim section when section

has several segments")

---
v2:
- cc stable mailing list

 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
index 1596502f7375..f2a4265318f5 100644
@@ -4544,7 +4544,7 @@ static void init_dirty_segmap(struct f2fs_sb_info *sbi)
 		return;
 
 	mutex_lock(&dirty_i->seglist_lock);
-	for (segno = 0; segno < MAIN_SECS(sbi); segno += blks_per_sec) {
+	for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) {
 		valid_blocks = get_valid_blocks(sbi, segno, true);
 		secno = GET_SEC_FROM_SEG(sbi, segno);
 

--
2.17.1

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

maintainer
#1 lore raw
Quoted 4 lines · Jack Qiu

section is dirty, but dirty_secmap may not set

Fixes da52f8ade40b ("f2fs: get the right gc victim section when section
Quoted 8 lines

has several segments")

---
v2:
- cc stable mailing list

 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel