Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp285184pxb; Mon, 16 Aug 2021 05:32:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylG4v9o8RTZa5794Q/mHRsOBFu0fNSDw52Oj4biq1ZGDF8v8Q//5l7xauB1OJt8oPlg6Zq X-Received: by 2002:a05:6402:2883:: with SMTP id eg3mr19636749edb.278.1629117127180; Mon, 16 Aug 2021 05:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629117127; cv=none; d=google.com; s=arc-20160816; b=RKviY0/aitcLJ+m8h9l4dVFmIlz/FqWtmd3L81zK1MmP4L5FpVzRnL8bNdFZFT/h50 NKy2kUKvJGb3iBlaqmbNuJods82FW6FP6Kw/WlaGfGpM0tMAxUx+3ev1aBy7mL2nyJbx vEkLPK+UBar5+HO9bSTjaqyqat2Co08/yx+uJmRSdsE7BJzL9VpRM5G1G7yizvCG1T3u VKUHS4iZlgk417rwN/mj3p6KTF3nQ4Ivka/P77zDkLegCi9MrQayVihIgAM7i3w4F2H8 uwq1+6XaRdSO4s8ocNGWgVP6NV0wbUpUWfu/a+GBkHqKuLzZWYstz/0N7FFI6tg6w6Xi NXVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xQfbWbL4NOuPXUbBW7ftbBoEl5JD3poMqMz/5TbQrzU=; b=JuGno2s8mh6QirbLezfPCTRnHyGhPaENhtHDzU8cF7KMCqv4pPsqAR4EM0CeU4yvE2 16MNtnxX4Y0GxjTAw4/2xOHFpzfsZmeDTJ4H23I2/SmYsah53MfK8bcZs1QHoZrxX7zW cD0kaTeG1H00XBsoMx4RwbIbs9cSMY0jzOg14C+pKSLkR4ldduyaXI/st/37Zz9Tz5Xd ClyiOwZ6D1RTxZW/YZNej7iEr/ipWU5ye95vBB89gCVkvi/z4SeOMRJ3K5l45MXf3Zvy Dpg+bd3WfNO5aSRJoR2JzKrqT5gw2lw/RZW65HskQdPO+C+ZYC3pvIlFg4OrGPtISnoH tqhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si1994405edb.449.2021.08.16.05.31.43; Mon, 16 Aug 2021 05:32:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234272AbhHPM2o (ORCPT + 99 others); Mon, 16 Aug 2021 08:28:44 -0400 Received: from mail-m17636.qiye.163.com ([59.111.176.36]:63824 "EHLO mail-m17636.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233204AbhHPM2n (ORCPT ); Mon, 16 Aug 2021 08:28:43 -0400 Received: from comdg01144022.vivo.xyz (unknown [218.104.188.165]) by mail-m17636.qiye.163.com (Hmail) with ESMTPA id 936B6C400B1; Mon, 16 Aug 2021 20:28:08 +0800 (CST) From: Yangtao Li To: jaegeuk@kernel.org, chao@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yangtao Li Subject: [PATCH] f2fs: change value of recovery to bool Date: Mon, 16 Aug 2021 20:28:07 +0800 Message-Id: <20210816122807.71400-1-frank.li@vivo.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUhPN1dZLVlBSVdZDwkaFQgSH1lBWUNPS0xWHU0ZTB4fHkxCQx hMVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NEk6Pyo4ET8CTBwMPBk0HTUB EyMwFBdVSlVKTUlCSkpNQ0NCSUxNVTMWGhIXVR0JGhUQVRcSOw0SDRRVGBQWRVlXWRILWUFZSUpD VUpLT1VKQ0NVSk1OWVdZCAFZQUlOS083Bg++ X-HM-Tid: 0a7b4eeef6b0d996kuws936b6c400b1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Recovery has only two values, 0 and 1, let's change it to bool type. Signed-off-by: Yangtao Li --- fs/f2fs/super.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 8fecd3050ccd..98727e04d271 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3541,7 +3541,7 @@ static int init_blkz_info(struct f2fs_sb_info *sbi, int devi) */ static int read_raw_super_block(struct f2fs_sb_info *sbi, struct f2fs_super_block **raw_super, - int *valid_super_block, int *recovery) + int *valid_super_block, bool *recovery) { struct super_block *sb = sbi->sb; int block; @@ -3559,7 +3559,7 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi, f2fs_err(sbi, "Unable to read %dth superblock", block + 1); err = -EIO; - *recovery = 1; + *recovery = true; continue; } @@ -3569,7 +3569,7 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi, f2fs_err(sbi, "Can't find valid F2FS filesystem in %dth superblock", block + 1); brelse(bh); - *recovery = 1; + *recovery = true; continue; } @@ -3784,15 +3784,16 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) int err; bool skip_recovery = false, need_fsck = false; char *options = NULL; - int recovery, i, valid_super_block; + int i, valid_super_block; struct curseg_info *seg_i; int retry_cnt = 1; + bool recovery; try_onemore: err = -EINVAL; raw_super = NULL; valid_super_block = -1; - recovery = 0; + recovery = false; /* allocate memory for f2fs-specific super block info */ sbi = kzalloc(sizeof(struct f2fs_sb_info), GFP_KERNEL); -- 2.32.0