Skip to contentSkip to conversation

f2fs: merge the two conditions to avoid code duplication

PATCH Applied mason.zhang 3 participants 3 messages Jul 23, 2025 – Jul 24, 2025 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: merge the two conditions to avoid code duplication

No functional changes.

---
 fs/f2fs/gc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
fs/f2fs/gc.c +1 -6
index 3cb5242f4ddf..2df02e36fd5f 100644
@@ -278,12 +278,7 @@ static void select_policy(struct f2fs_sb_info *sbi, int gc_type,
 {
 	struct dirty_seglist_info *dirty_i = DIRTY_I(sbi);
 
-	if (p->alloc_mode == SSR) {
-		p->gc_mode = GC_GREEDY;
-		p->dirty_bitmap = dirty_i->dirty_segmap[type];
-		p->max_search = dirty_i->nr_dirty[type];
-		p->ofs_unit = 1;
-	} else if (p->alloc_mode == AT_SSR) {
+	if (p->alloc_mode == SSR || p->alloc_mode == AT_SSR) {
 		p->gc_mode = GC_GREEDY;
 		p->dirty_bitmap = dirty_i->dirty_segmap[type];
 		p->max_search = dirty_i->nr_dirty[type];
Signature · 1 line
2.50.0
#2 lore raw
In reply to mason.zhang
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 6 lines · On Wed, 23 Jul 2025 22:58:37 +0800 you wrote:

No functional changes.

---
 fs/f2fs/gc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Here is the summary with links:
- [f2fs-dev] f2fs: merge the two conditions to avoid code duplication

    https://git.kernel.org/jaegeuk/f2fs/c/b93bf64e349b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html