Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp912139lqc; Fri, 8 Mar 2024 16:11:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUOWhLJNjPmzTKgipXmmPnZD+7+pYxOd2intV2ZI1rNxnNQ7FKfYVK4tn8B8cxiZsAV7ke0I5ty/QxO2FwMasFILdAZ9635/nvRbF8sqA== X-Google-Smtp-Source: AGHT+IG2t92w98i5jq68dVy48AvC6S4/F9i0NFKX8R0pCSAxi85jCLTBi8UWIYk4y+Bt0cKbWuWk X-Received: by 2002:a0c:fec6:0:b0:690:b43d:7ef5 with SMTP id z6-20020a0cfec6000000b00690b43d7ef5mr704577qvs.11.1709943068369; Fri, 08 Mar 2024 16:11:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709943068; cv=pass; d=google.com; s=arc-20160816; b=EQGtHgCZL2ax5quru8k2HsWUkomWz2CyF8sm17ryo8QKVpETUMt3w6dbomZiRarK0X +1Cw0WEUy+cJoQaqFDnbnjOTFq5ZD5k90FpUkShbpnGSk52zsyO7Rqo+zBnApLxzEw3k 2VivMK+N5V/4A6Pe4GJ5vVJxxPAWNHFT7fSVFLN7nrVE6C8akG4p1vKCh5ChOhDNvUhQ d0IOLljkPXKrW+ZqFxiVIUJ+g13ZP3eIRUitZDAuq/Dqzg24L0VrVxVd+Ve9l1gjf72A l/B9P5Z1j7517yNJlJYFbycktyr4j4J8YukalnpZjJSHtwXarwKcsi6uqTbjn5qAzpvw edfg== 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:dkim-signature; bh=6udChvsJI7Z+HUNWq4D1EHrNhJnHUNQ8hivVq1BuE9M=; fh=9i/XBEU7c2BC8ig54Kb4dUX7f3dsZiP2ZH9/0ihDdC0=; b=or9GqQPQ9cL98cJZ24TBe3dnwaxDb+Iikah4bW9MFaLGoK3jfPDU/His0rHiGrUyaD qEuvuF2a+z/WyZTiNu33ieAkd69vBcd6GmPDf8uQEArCUhVvKAj+x4N72Lb2QpLRLkmc I86arCg+mqgcSv4p12HDe1zce9f4RGYoWMEmDs0L+TRm9j6Fj7xdpDD3F2Ym1R9M/bj9 BZSYCcQpp6QvSUaX9Vmr8W+6ILnZeylg8ZbplANf69YEOsUDZWXFJWApEH3hjE0A8esH Sby60azfUXpSs8xvuJ+OgGj7kz+gfZWp5IYEAjaRuZGqHj/AqUbTO5pFlKn4IgXYU9Mm QkSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=iBb+UMdR; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); spf=pass (google.com: domain of linux-ext4+bounces-1577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=meta.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m2-20020ad45dc2000000b0068fff0854f0si614923qvh.390.2024.03.08.16.11.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 16:11:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1577-linux.lists.archive=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; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=iBb+UMdR; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); spf=pass (google.com: domain of linux-ext4+bounces-1577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=meta.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 1F8DA1C22254 for ; Sat, 9 Mar 2024 00:11:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1220627; Sat, 9 Mar 2024 00:11:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b="iBb+UMdR" X-Original-To: linux-ext4@vger.kernel.org Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (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 C08D736E for ; Sat, 9 Mar 2024 00:11:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.153.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709943062; cv=none; b=sdaZxpll4NyY+cDQcUzFFeD/AGky5ySYOQKDdJumHfKlWuHFIEvOkQ2yGZrHuv5AQ5ywaefH5KMG/qz0Q3SVN2laL1gV58yQ2u+GZbTHrlFHd7rFPpk30vL/Puh0eayYcuMRObjr5+NzlimO+2z7wDED4o79uEA6XvA77KYgqgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709943062; c=relaxed/simple; bh=RHEdZdrVo+YM356gV9vCdrE9WkWiKBsJOhOyMIyK9aE=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=cxCNDEzbAmJQ3PgBbuCfGXgCFnQfRNyUXbGlOoRcYpqlVrl/GzIQ6YihUwnVFv14keUiBygR3D2EODeyu5X7b5civDjMu7SLcSaKCHAGnGjr6rnucOkwmMauitAFXGSa1cILeLWXfJZc+Rxx+YWAKI4+BuT0ernEAshPEOBjhxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=meta.com; spf=pass smtp.mailfrom=meta.com; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b=iBb+UMdR; arc=none smtp.client-ip=67.231.153.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=meta.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=meta.com Received: from pps.filterd (m0148460.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 428N0T8P002912 for ; Fri, 8 Mar 2024 16:10:59 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=6udChvsJI7Z+HUNWq4D1EHrNhJnHUNQ8hivVq1BuE9M=; b=iBb+UMdRp7WaHwalhhSTLxlK2Aus/IRXrOt7UsSHTMZITzLoRO3o8RtR+q4jsz7QoLdb 3yA0mphBcOR90MGUTQlGaMOuk+2ezVOEYiMi2mOp0no//TD+uIPfkE7yQg++Yw/iHntO C6hiWNMjNO1ZKmGn/NT76HuNrjRpExjlHRpsd8L7dLszAfavMwOA1CDVFA6+ACvLQ0mW oyBP4Imp28Gb8Z6cIb2iofVJS0i4KEex/gzOjeOs/ghEFGfJPBGFMkALaB/GF95bDqKx kUf69SKhrGkV2cFjqEg6szauLgG0SB5dcXbGT662hGATYIWMHAb34NjXIW9rvrZKGNVR ow== Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3wrby888c5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 08 Mar 2024 16:10:59 -0800 Received: from twshared28280.38.frc1.facebook.com (2620:10d:c0a8:1b::2d) by mail.thefacebook.com (2620:10d:c0a8:82::b) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 8 Mar 2024 16:10:58 -0800 Received: by devbig007.nao1.facebook.com (Postfix, from userid 544533) id 9C03D25F46246; Fri, 8 Mar 2024 16:09:44 -0800 (PST) From: Keith Busch To: CC: , , , Keith Busch Subject: [PATCH] ext4: remove unreachable discard code Date: Fri, 8 Mar 2024 16:09:43 -0800 Message-ID: <20240309000943.1400879-1-kbusch@meta.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-GUID: kiLEu_OyuDEVYXOVVgj_pwLZsYSE434S X-Proofpoint-ORIG-GUID: kiLEu_OyuDEVYXOVVgj_pwLZsYSE434S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 From: Keith Busch There are no more ext4_issue_discard() users that track their own bio. Remove the unused parameter and the dead code that handles it. Signed-off-by: Keith Busch --- fs/ext4/mballoc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index e4f7cf9d89c45..6314a2b000fd8 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3829,8 +3829,7 @@ void ext4_mb_release(struct super_block *sb) } =20 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; =20 @@ -3839,13 +3838,7 @@ static inline int ext4_issue_discard(struct super_= block *sb, count =3D 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); } =20 static void ext4_free_data_in_buddy(struct super_block *sb, @@ -6487,7 +6480,7 @@ static void ext4_mb_clear_bb(handle_t *handle, stru= ct inode *inode, } else { if (test_opt(sb, DISCARD)) { err =3D ext4_issue_discard(sb, block_group, bit, - count_clusters, NULL); + count_clusters); if (err && err !=3D -EOPNOTSUPP) ext4_msg(sb, KERN_WARNING, "discard request in" " group:%u block:%d count:%lu failed" @@ -6738,7 +6731,7 @@ __acquires(bitlock) */ mb_mark_used(e4b, &ex); ext4_unlock_group(sb, group); - ret =3D ext4_issue_discard(sb, group, start, count, NULL); + ret =3D ext4_issue_discard(sb, group, start, count); ext4_lock_group(sb, group); mb_free_blocks(NULL, e4b, start, ex.fe_len); return ret; --=20 2.34.1