From patchwork Wed Jan 10 18:53:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 186990 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp989431dyi; Wed, 10 Jan 2024 10:55:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHH+0YcLOqoAjGo73Y5SgbKuskeuLwVxHlhsDUvqJUp2HfZVy6SG/M9xQxfMdQQpt4yA8/8 X-Received: by 2002:a17:90b:289:b0:28c:e8f5:e052 with SMTP id az9-20020a17090b028900b0028ce8f5e052mr1149082pjb.34.1704912954119; Wed, 10 Jan 2024 10:55:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704912954; cv=none; d=google.com; s=arc-20160816; b=xQy9OcmdAancE25FBhpAZrtyK52qyHtP0UkOsgOuUHWC6PbT4G0uV7c+eDeQk9gau2 ZpnnV2o2V1CXD0Yc2RH9ZgffxgEtaC4DSuIiGeAE3NL31O1XqoLFfeuqn2eQ1hs324zU ajj6UIZGWx6DU4BuK9KL2qtKK73G+UGlqVso1GaYRKv8iSEUJ0MpBh6wroa70SaHblJ6 2CsnO3/XmogZmudiLWu9oopawMs26JxX+QPQKDmE9o6FpDIPMG5Yuc9CKw94+3f4rspf 0bzBDRqc2dpXrqCw1AVjUf6q4XYeF3D5qr4bL78WCoU79H2lmE6a+1+8rABn5dPHTVRY kstA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=Ss0T+jeGd3iEpXbsD78ddZjuQMQNPqW6KGHNG8S5dhg=; fh=jHkyrdZ9Pe9q/m2yE4Fiv+wK0FktjDPn9196pIVjuaM=; b=XXtaCxcCMv3LsWhMRXgHHc90JfSfgrQvmR1rDtixdf47IpC8KSamMoiZKlwZhc1nAi pn5DbRblrWEwNa5Sa9T/rZ+KrLbA5jPTShuin9TbC2xCxiS/uwPvhlV3+VjBpEMFlusL aGYrv0P950ZDo536sLabVCH1RGPyjY2nljVkX4UW+EJkjauYUJ0EDSgkqnVX3dMAExAS RSOkZpOK5lYOfDNBn3qp3rfKkAv5LsEjttHnQfPiLI0/bKEJcE9TxFSv4Piu1BZG5SQI MVH1mp5TFWlA1OihvG33TcMiWp6Gu99UNrHGcOiRd9jTTB0ZFT/iT5mTKQdJaKL6uRjx iBHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r0nllWcX; spf=pass (google.com: domain of linux-kernel+bounces-22618-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22618-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c20-20020a17090a8d1400b0028c26709e8bsi1892833pjo.10.2024.01.10.10.55.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 10:55:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22618-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r0nllWcX; spf=pass (google.com: domain of linux-kernel+bounces-22618-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22618-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A5EF5B23972 for ; Wed, 10 Jan 2024 18:54:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA9B04D5B4; Wed, 10 Jan 2024 18:54:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="r0nllWcX" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36B6E4CDE0 for ; Wed, 10 Jan 2024 18:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3376f71fcbbso2743270f8f.1 for ; Wed, 10 Jan 2024 10:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704912842; x=1705517642; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Ss0T+jeGd3iEpXbsD78ddZjuQMQNPqW6KGHNG8S5dhg=; b=r0nllWcXuqQ1kAdId1EKxhcATqA+Fyv3U4XFbb674X3AEp/Px2dvj8vNUuudoH7ppw RjEp6XYZvn0vwNhRBeins2+SEzqSrXP9uCPG6lJf0m2OHmyNFCFPfxcAZjVmL+f8NQhj jm+iduk0mY5py6KqQ8ucR1JepzH6T/CFT2DdJOmtcB3gqZl6oBerTFxw5JZbk7yp4fP4 iRhxbNOeU+1Fuv1VQVvR4yWAD2s7iYiUhkNZFBaz22XibTkIHY1U7cU30BoQKkdWVzuS 97euo62T2vtvDlG8mnWtzupKc5isMy1E6+veITvyXTFNhL2GXiI7lzW+zfiHah0YPFr2 nHdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704912842; x=1705517642; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ss0T+jeGd3iEpXbsD78ddZjuQMQNPqW6KGHNG8S5dhg=; b=vp6SbGgVg7QaRRH6BvyWM+OdbiWL/w9xFqHN5Fkz5gI6Ik9eczrWd2Z638hm70eYyR NrqlmNEVtt391jQACGBDbqsmoZMsZ+gx5Dc0J5v/TkaXfpCcB6X7eqD2zwCcM2hHhwTs O1mR2HJHs8G065BDngdkkJPVYJTfynuLHE9AtIohoF+/qbV1HJDd2K6fhetSveeQClH9 Pi1WEPK6NohW0dVgSFLg7eceoJXHm7fJgzabCVv9ZHYUM/wm84gIIh+1Wxk5BuhhuwI6 k0R/lXsybUfgxzqlzInfPZ2WuL49JEL/YBHLT+l+y7RX0qu8ZzJ1KKNx0Sn1+RYzgib8 KFow== X-Gm-Message-State: AOJu0YxN8Nt5NkrarTAfpQ7lLNP1+BqRKnkAUtp2zuj3uO3dsmbOzEte c2Uzq4UQ8qjA2QOFUfnNIcFsHQoOKfsQLw== X-Received: by 2002:a05:6000:184b:b0:337:6529:1dd8 with SMTP id c11-20020a056000184b00b0033765291dd8mr823385wri.168.1704912842572; Wed, 10 Jan 2024 10:54:02 -0800 (PST) Received: from localhost ([102.140.209.237]) by smtp.gmail.com with ESMTPSA id dp7-20020a0560000c8700b003366e974cacsm5538195wrb.73.2024.01.10.10.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 10:54:02 -0800 (PST) Date: Wed, 10 Jan 2024 21:53:59 +0300 From: Dan Carpenter To: Chandan Babu R , Eric Sandeen Cc: "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] xfs: delete unnecessary check in xfs_growfs_data_private() Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787730806029201173 X-GMAIL-MSGID: 1787730806029201173 Commit 84712492e6da ("xfs: short circuit xfs_growfs_data_private() if delta is zero") added a check for whether delta is zero to the start of the function and now this check is no longer required. Signed-off-by: Dan Carpenter --- fs/xfs/xfs_fsops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 83f708f62ed9..6de8c5f428b6 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -180,8 +180,7 @@ xfs_growfs_data_private( */ if (nagcount > oagcount) xfs_trans_mod_sb(tp, XFS_TRANS_SB_AGCOUNT, nagcount - oagcount); - if (delta) - xfs_trans_mod_sb(tp, XFS_TRANS_SB_DBLOCKS, delta); + xfs_trans_mod_sb(tp, XFS_TRANS_SB_DBLOCKS, delta); if (id.nfree) xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, id.nfree);