Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1181494lqd; Thu, 25 Apr 2024 08:07:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAX9j2xyusDlyjBce7Gn5puYgmco109tByvnPiZKj6jJflepyweomn3EOdPbtSJoPw3Y/608SiMpatRWLx+8FQBl6+eNK2fkuWQ9orPQ== X-Google-Smtp-Source: AGHT+IH9VoGptBkuyXRyDztxtioAJA/gDKgaHSgL7pHK0eLFIoOIUMd4JoM128R4kOeguFLOj9qV X-Received: by 2002:a17:906:b283:b0:a55:9574:48a6 with SMTP id q3-20020a170906b28300b00a55957448a6mr3150600ejz.30.1714057669529; Thu, 25 Apr 2024 08:07:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714057669; cv=pass; d=google.com; s=arc-20160816; b=0OTQoUkIp5LYJghYcCSFkb2n55tHDsfXvSPgCI8ytmN2XwGc+TXG31X9piM0O8F4Tv MIhNh6M0hBuaDDWX5kLlVwi+pLF0FXcXA2Q3zS5MEAfiYDK0khAKzYWC9gMwncXID+G1 BhLbQzLIoBz5HkR3Mnn8v2yTj38SbZo0rmtl880trYyTACbKKpvRL88TwDMc7F0+TkUH av7Jdrc/6dum1syZw2sokcVlr4QvQRuWH0MmMI6Atur67QO3KgmMa1pBNZw60qAcokmr JS4NUiLnSbdBYOXERbDwKXPwzPIo1iWsNyw1+tAdCzHJv15+80v6i6GOWe3rNyETTvNx tC8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=/Nl3JOPVeBdfmD2v9lCk6sV034nFP8z6mhsfuVwoaAM=; fh=XOQrzPirTzOy9msqavtU5Gq6aVIW1R6wGylXyb5S1Y8=; b=YOY57s8eWUaHkGAAozid3rUb1NTFypRMSKh0uoGqarJgZP+ZwxD3AlJccpLXswMSp5 aCMdNhWAPD9A4+aCIR7nCT28dOk6BCRw8DqCMFMPzYFIH21SzBMcniTumHOofWAjRtTp SPC8llQDTEoAUY4IarNVi0ffwxsWDRLGgRTrSfNKv2UaHeNaTuiluodz632G1Qluw5no UkzlKRd48O9ww+UNxnlYGqXx+lUQqD8MUfRv9XB4aA6qAkcliS+w6xRkFxI049WGUzHC qmXGaSLeE2DglhFG+3GWTak6pq+/w2EPxNXZ745p14WPG+/+r9CdOxwAGNPg83swHt8V 2RNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sjtu.edu.cn); spf=pass (google.com: domain of linux-kernel+bounces-158767-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158767-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f23-20020a170906139700b00a51a6b52948si10155861ejc.245.2024.04.25.08.07.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 08:07:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158767-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sjtu.edu.cn); spf=pass (google.com: domain of linux-kernel+bounces-158767-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158767-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5F1381F230B5 for ; Thu, 25 Apr 2024 15:07:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4737B14E2C0; Thu, 25 Apr 2024 15:05:08 +0000 (UTC) Received: from smtp232.sjtu.edu.cn (smtp232.sjtu.edu.cn [202.120.2.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C638E14AD38 for ; Thu, 25 Apr 2024 15:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.120.2.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714057507; cv=none; b=RjOtmJ1HBXyv6PpjTWPoMk3Y3IiWLQ9ZrO1gPQ6Tpl+BNuvEgSKyWDufxSnHNDeY9L6TG/MHA7p+bfEigB6Int9pT8v3rkd5Vmoj0AqC+6dwTF+dIpSH4nDcOc82UshggB/mlMAfHQoxvIJJRtH0QZ9ksTIT7rdwjrtB9Gsq+tI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714057507; c=relaxed/simple; bh=7GgKCZNA8YG4pda2cJjsXOmL0hF/aMYRDuq0OcqOcYg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WA2joxapQw5FWBwRj2/dVl0R86ev3FejUg3q1brLwS5VUjVN6siptcy1VwpFk+LO1H390YFRi6qcicYaI/chU9HnNnpfE+f6vCKZ+d91I2kgsu3CEFH1pntwCBMeALpPhXH2MGCHcnhbGA57jfGDwHGkv570ijQxu+PAuFogxbw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sjtu.edu.cn; spf=pass smtp.mailfrom=sjtu.edu.cn; arc=none smtp.client-ip=202.120.2.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sjtu.edu.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sjtu.edu.cn Received: from proxy188.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp232.sjtu.edu.cn (Postfix) with ESMTPS id 05E30100460AA; Thu, 25 Apr 2024 22:55:57 +0800 (CST) Received: from zhaoyf.ipads-lab.se.sjtu.edu.cn (unknown [202.120.40.82]) by proxy188.sjtu.edu.cn (Postfix) with ESMTPSA id D655C380D11; Thu, 25 Apr 2024 22:55:52 +0800 (CST) From: Yifan Zhao To: jaegeuk@kernel.org, chao@kernel.org Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Yifan Zhao Subject: [f2fs-dev] [PATCH] f2fs: remove redundant parameter in is_next_segment_free() Date: Thu, 25 Apr 2024 22:55:28 +0800 Message-ID: <20240425145528.2925372-1-zhaoyifan@sjtu.edu.cn> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit is_next_segment_free() takes a redundant `type` parameter. Remove it. Signed-off-by: Yifan Zhao --- fs/f2fs/segment.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 2206199e8099..8d63ddfe4a77 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -2645,7 +2645,7 @@ static void write_current_sum_page(struct f2fs_sb_info *sbi, } static int is_next_segment_free(struct f2fs_sb_info *sbi, - struct curseg_info *curseg, int type) + struct curseg_info *curseg) { unsigned int segno = curseg->segno + 1; struct free_segmap_info *free_i = FREE_I(sbi); @@ -3073,8 +3073,7 @@ static bool need_new_seg(struct f2fs_sb_info *sbi, int type) if (!is_set_ckpt_flags(sbi, CP_CRC_RECOVERY_FLAG) && curseg->seg_type == CURSEG_WARM_NODE) return true; - if (curseg->alloc_type == LFS && - is_next_segment_free(sbi, curseg, type) && + if (curseg->alloc_type == LFS && is_next_segment_free(sbi, curseg) && likely(!is_sbi_flag_set(sbi, SBI_CP_DISABLED))) return true; if (!f2fs_need_SSR(sbi) || !get_ssr_segment(sbi, type, SSR, 0)) -- 2.44.0