Skip to contentSkip to conversation

f2fs: simplify the processing logic of retry_cnt

PATCH New Yangtao Li 1 participant 1 message Apr 25, 2023 F2FS file system

lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH 1/1 f2fs: simplify the processing logic of retry_cnt

Replace

    if (a > 0) {
        a--;
    }

with:

    if (a-- > 0) {

    }
---
 fs/f2fs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/f2fs/super.c +1 -2
index 107585797ffa..cbab0cc2c82e 100644
@@ -4769,8 +4769,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 	kfree(sbi);
 
 	/* give only one another chance */
-	if (retry_cnt > 0 && skip_recovery) {
-		retry_cnt--;
+	if (skip_recovery && retry_cnt-- > 0) {
 		shrink_dcache_sb(sb);
 		goto try_onemore;
 	}
Signature · 8 lines
2.39.0



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