Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1168016rbb; Mon, 26 Feb 2024 00:19:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW5dysiiH5JTRDvthTJOSJb5Xu3InO9T9Cyc9PK8gQqfQvr4R+X6jHY+mHL9aVy4AcfM8kZj7sHq30GLoDXZZ2OJvBt+S5iMgd9UIXWWQ== X-Google-Smtp-Source: AGHT+IF4S1ETJ424gYSixZIx/vm37gkDQj/hlNoSpIMFeSrctoWxAdZbfUbPKj2hkL3T0JzU4iQe X-Received: by 2002:a05:6102:754:b0:470:394e:a9da with SMTP id v20-20020a056102075400b00470394ea9damr4057454vsg.1.1708935595388; Mon, 26 Feb 2024 00:19:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708935595; cv=pass; d=google.com; s=arc-20160816; b=VJMGZ0BWtVTrHzB7DroIP4exGp5RpSVz2RCLU/BsREGfLoCegjswTPfG9v61/sCS1Q sKOMtJGS2oDPtYCq9XTAwpcE0qDaHZLzVdI3KVwmRSmVgWBNQC65gnbpc1a2SP9TsyWz xVLyGF+86JIHN+FQXLGw5vffK8Jjk7591ONd7C+7tvxlsNT2UuyjYqUnU+UMBx/PlNs/ iupNb1w4+dA0ZhTbM2d/7r6ZgHLLMpi2misizKk5UqfSrOPNf+ug//GhEm+HXXztPGiV nnk+ntuR3h+jPVpD1ErwVbCyb8n5VU38ePizSXjADhlMdM4fpcTDAKjChukfzQRDuj3O PgYQ== 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=dhNyQxzF5KoUhTKhjMVL+l3TY/UwtfdUxdTeSzHRv7Ur0b6y9+nt7GRNORt44/8Vk7 vvJMQaByAaJYXOdNneQv0EgHP6DtQyrOCzK5e5o7URxwc5NE6pcyRtbSuGrmuCx1Zg0I qibW9yEjFplSiOW89hYLt1SICSKGuot+YnPGjxax0OKrdvx2fLqle9T3xSvAv+69g+MQ abyKm9kS15YfPxwSW+lNHlaPXrke3RZCpA4zvnjs0SVEgBjpiQ6lGtco7QKTHtrKbNs2 ecCW2fuwwUfAeJIkZ6jyPoKaBpSu5Q+eHXDgR/7G1Tc+PjWiO5KtN1KmqAYTD9W8GHes kXzg==; 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-ext4+bounces-1387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gi4-20020a056214248400b0068f92006e6fsi4605756qvb.486.2024.02.26.00.19.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:19:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-ext4+bounces-1387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1387-linux.lists.archive=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 CED631C22BE6 for ; Mon, 26 Feb 2024 08:19:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 255F41CAA2; Mon, 26 Feb 2024 08:19:45 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org 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-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600012.china.huawei.com (7.193.23.74) 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 --- 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; -- 2.32.0