From patchwork Mon Feb 26 08:17:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenchao Hao X-Patchwork-Id: 206340 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1934471dyb; Mon, 26 Feb 2024 00:20:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9REAcfojnK+dT8Gr/WyXOTx5FYcydrYCYqDTZ6PjvZe4b18dSTqkS10KNEzwdhU/xVApd+A7OjeKp7kIDB9+ZvFAKCw== X-Google-Smtp-Source: AGHT+IFKY4vWn55ZaYJyiZ+JoHl1WxmPOwAYN6lbfpiEUOBDjIQDTq9pqltcRUJnahl9RzlKRWX4 X-Received: by 2002:a81:9bc6:0:b0:608:d05f:3e2 with SMTP id s189-20020a819bc6000000b00608d05f03e2mr4857527ywg.27.1708935610148; Mon, 26 Feb 2024 00:20:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708935610; cv=pass; d=google.com; s=arc-20160816; b=FdnopZ96Iin2xK6vlJYdClCr4SdlmXvPiZBeBvWMWQ2RyHCjjfOLZdUU7L8iPZQEPr YJJC+So/tEsjwwtJEJyq76i2QeXn7m4RAcZg5PSsUsDfx/Jn96tZTdC7sBPFSMaKr/A9 8yJyEuDrizW0c4emr4BJVdzNFdP+kmLv3ggzfvc1PHP7ThWczPPbzg2/kSiKAX6lLcyT NDhb/nPpJfEgczrD5+Wz0R1Qs9SD/WYyv7thr9q/grNfOr6tTN/voJZ9OSo5D9mEA7Lx tj6akTjnBOTLPU8o56pmv/oLAk2Z85pHUccSIrFuwBaHu6HLWup8J38ERx2iyDYwL3Rx GkSQ== 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=RjGWqt5m0TTXrn39lbFIxOUVBxIEDZT2VEx+1q75mkU=; fh=QjIEJ/zuKXx/1v7a4+m8i3xsoYwSlT2gRNKKQOItQ3M=; b=h1lUPZILcCKF0TXan58396UDN6MyVSbHEcCDPuGxl34KXfaZ3M9m9P/YlVwCS20tH2 /GyJ9EhSkKIdg83/s3RRTw25eiYsogD3G45uC+BNiRqiKDNW7nAYGAw9BStEcd3i58C2 ZlDtytnlUgGK8H/WGgGYq4/LajHtwkccseiw7SQbjRhRW6A7dzfktP9zZR2HjXP66AKL VJ7wSOK3kT/WbhaUdOX/MYNGeDpaP20ccaKBlgHjj4+wYmsrVvWx0SZgTt1OxSgir+3V ii4dMZAQdXeT7BteOKhErNiyi3J9rvYYjNXb/0gJQ7LfUOO3Q2H3BEhUaU07pDhaHFOk AdMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-80745-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80745-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c23-20020a05620a165700b00787b57ab193si4607294qko.94.2024.02.26.00.20.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:20:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80745-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-80745-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80745-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EB2B21C226E7 for ; Mon, 26 Feb 2024 08:20:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FD4D1CD1A; Mon, 26 Feb 2024 08:19:46 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 0C9B11C6BE; Mon, 26 Feb 2024 08:19:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708935584; cv=none; b=KSpwRVqV8Rwg6lqSYWIqhedlvVp4ewqBV6RgZ//RTGnpkwUYRtS85oV+t9ZInf9tBueJ/GJvyHToNIDpX34DsNgn5pCLDletBkczaBg8PsDT02oEYfgcupD370V0hSlveX6T6yaqklKFMjP3ZEwpNHXcbsm0WIfYV0f0vAbytb8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708935584; c=relaxed/simple; bh=7Cvdv+6m35PKTqou4Ax97tarJ+H1kTTmnj+72Mpfq0U=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=i66LpJCJSHQ/HwvDqByJn2P1AJx0tO4HqIY6TJ76NEgMwueBsdn+qiY2nhy6fIEyrcLYu7jVYgA0p770CHcfWuHC9O+h4ex79T8pO56FX6DIkVnWi/9tsXGya8SfLRJGKCm3dh4Sb85XzmuZwjw5N9jLrZn3fC7MEvBwn7pT3Ec= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Tjtl71np4z1h0fk; Mon, 26 Feb 2024 16:17:23 +0800 (CST) Received: from kwepemm600012.china.huawei.com (unknown [7.193.23.74]) by mail.maildlp.com (Postfix) with ESMTPS id 37B2D1A016C; Mon, 26 Feb 2024 16:19:36 +0800 (CST) Received: from build.huawei.com (10.175.101.6) by kwepemm600012.china.huawei.com (7.193.23.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 26 Feb 2024 16:19:35 +0800 From: Wenchao Hao To: Theodore Ts'o , Andreas Dilger , , CC: , Wenchao Hao Subject: [PATCH] ext4: remove unused parameter biop in ext4_issue_discard() Date: Mon, 26 Feb 2024 16:17:31 +0800 Message-ID: <20240226081731.3224470-1-haowenchao2@huawei.com> X-Mailer: git-send-email 2.32.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600012.china.huawei.com (7.193.23.74) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791948866507163944 X-GMAIL-MSGID: 1791948866507163944 all caller of ext4_issue_discard() would set biop to NULL since 'commit 55cdd0af2bc5 ("ext4: get discard out of jbd2 commit kthread contex")', it's unnecessary to keep this parameter any more. Signed-off-by: Wenchao Hao Reviewed-by: Zhang Yi Reviewed-by: Ritesh Harjani (IBM) --- fs/ext4/mballoc.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index d72b5e3c92ec..1590ee3f4603 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3807,8 +3807,7 @@ int ext4_mb_release(struct super_block *sb) } static inline int ext4_issue_discard(struct super_block *sb, - ext4_group_t block_group, ext4_grpblk_t cluster, int count, - struct bio **biop) + ext4_group_t block_group, ext4_grpblk_t cluster, int count) { ext4_fsblk_t discard_block; @@ -3817,13 +3816,8 @@ static inline int ext4_issue_discard(struct super_block *sb, count = EXT4_C2B(EXT4_SB(sb), count); trace_ext4_discard_blocks(sb, (unsigned long long) discard_block, count); - if (biop) { - return __blkdev_issue_discard(sb->s_bdev, - (sector_t)discard_block << (sb->s_blocksize_bits - 9), - (sector_t)count << (sb->s_blocksize_bits - 9), - GFP_NOFS, biop); - } else - return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0); + + return sb_issue_discard(sb, discard_block, count, GFP_NOFS, 0); } static void ext4_free_data_in_buddy(struct super_block *sb, @@ -6475,7 +6469,7 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode, } else { if (test_opt(sb, DISCARD)) { err = ext4_issue_discard(sb, block_group, bit, - count_clusters, NULL); + count_clusters); if (err && err != -EOPNOTSUPP) ext4_msg(sb, KERN_WARNING, "discard request in" " group:%u block:%d count:%lu failed" @@ -6726,7 +6720,7 @@ __acquires(bitlock) */ mb_mark_used(e4b, &ex); ext4_unlock_group(sb, group); - ret = ext4_issue_discard(sb, group, start, count, NULL); + ret = ext4_issue_discard(sb, group, start, count); ext4_lock_group(sb, group); mb_free_blocks(NULL, e4b, start, ex.fe_len); return ret;