[PATCH] f2fs: simplify the processing logic of retry_cnt

Yangtao Li posted 1 patch 2 years, 9 months ago
fs/f2fs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] f2fs: simplify the processing logic of retry_cnt
Posted by Yangtao Li 2 years, 9 months ago
Replace

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

with:

    if (a-- > 0) {

    }

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 107585797ffa..cbab0cc2c82e 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -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;
 	}
-- 
2.39.0