lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230425192448.35767-1-frank.li@vivo.com>
Date:   Wed, 26 Apr 2023 03:24:48 +0800
From:   Yangtao Li <frank.li@...o.com>
To:     Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>
Cc:     Yangtao Li <frank.li@...o.com>,
        linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: [PATCH] f2fs: simplify the processing logic of retry_cnt

Replace

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

with:

    if (a-- > 0) {

    }

Signed-off-by: Yangtao Li <frank.li@...o.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ