From nobody Mon Feb 9 13:58:37 2026 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.2]) (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 C42A137BE7F; Thu, 8 Jan 2026 07:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.2 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858650; cv=none; b=NgXr1NzLjlURszSWvP2qyglCAcnbhKTLTwij6oCEit9jTS8yuaWmPph1xMc220O89ib6k7caYjrQU3sQ2jfLe8tI2VhavFtEWW0YMF5z8cd6TZ3ypye8YGvQkYXe6JMMQVXOs6qOSTGSBR0ik/nig/7mCgb+BjmuRASfNHbdloc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767858650; c=relaxed/simple; bh=qwy5WYsryk7/u5ceZx8Nqym3TssQZfowE9W3ezIsWWs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ejROZxa6Q8UpTakPqPdBSqgQbERHZFlz+6ZrTYE6JtwIJEkhvxNJVLIWLQSGHcDp4E7nv9a0vMeTIx/7jJD9KJb4JMXQGyb6fG9D0B4mOtbFGbnpDweuTHPqPL1FA2d/IAeZNZbKZTeUJgU5WFVffmQxToa8FJzD8BshVfTBuaU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=KYn1MCZK; arc=none smtp.client-ip=220.197.31.2 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="KYn1MCZK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=Se lkJa8tRuMOUM18VkgbogIbooDqQw60hnJ00wkfYOY=; b=KYn1MCZKFIFa2BTiUE 0UpYh3a7Yx9JJLQGy1Zdm2cDmGfQDp1sY0p1IT+N+cMelOpucqYvluvLHxpJo5t5 k6vscLCrngUToNotpEIshnI+obxZJYmpFNbZlBjBktCuWFWK2aFHhZQU7eKMQPlm k1UavenGdPr0fGsjRfypTrKV0= Received: from czl-ubuntu-pc.. (unknown []) by gzga-smtp-mtada-g1-2 (Coremail) with SMTP id _____wBH6+WpYV9pdSx_Eg--.889S11; Thu, 08 Jan 2026 15:50:08 +0800 (CST) From: Chi Zhiling To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Namjae Jeon , Sungjong Seo , Yuezhang Mo , Chi Zhiling , Yuezhang Mo Subject: [PATCH v2 09/13] exfat: remove handling of non-file types in exfat_map_cluster Date: Thu, 8 Jan 2026 15:49:25 +0800 Message-ID: <20260108074929.356683-10-chizhiling@163.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260108074929.356683-1-chizhiling@163.com> References: <20260108074929.356683-1-chizhiling@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: _____wBH6+WpYV9pdSx_Eg--.889S11 X-Coremail-Antispam: 1Uf129KBjvJXoW7Aw1fXF1fXrWDuF15uFW8Xrb_yoW8Jw1Upr srGa4kKay5Xay7KF40gFs3Z343J3Z7GrWDXFW7Ar1Ykr9Yyr1F9a9Fkr1xC3W8C3y8uFWY q3W3Gr4a9rnxGFDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j2JP_UUUUU= X-CM-SenderInfo: hfkl6xxlol0wi6rwjhhfrp/xtbC9xC2VGlfYbBtkwAA3c Content-Type: text/plain; charset="utf-8" From: Chi Zhiling Yuezhang said: "exfat_map_cluster() is only used for files. The code in this 'else' block is never executed and can be cleaned up." Suggested-by: Yuezhang Mo Signed-off-by: Chi Zhiling --- fs/exfat/inode.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index 55984585526e..b714d242b238 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -156,27 +156,11 @@ static int exfat_map_cluster(struct inode *inode, uns= igned int clu_offset, else *clu +=3D clu_offset; } - } else if (ei->type =3D=3D TYPE_FILE) { + } else { int err =3D exfat_get_cluster(inode, clu_offset, clu, &last_clu); if (err) return -EIO; - } else { - /* hint information */ - if (clu_offset > 0 && ei->hint_bmap.off !=3D EXFAT_EOF_CLUSTER && - ei->hint_bmap.off > 0 && clu_offset >=3D ei->hint_bmap.off) { - clu_offset -=3D ei->hint_bmap.off; - /* hint_bmap.clu should be valid */ - WARN_ON(ei->hint_bmap.clu < 2); - *clu =3D ei->hint_bmap.clu; - } - - while (clu_offset > 0 && *clu !=3D EXFAT_EOF_CLUSTER) { - last_clu =3D *clu; - if (exfat_get_next_cluster(sb, clu)) - return -EIO; - clu_offset--; - } } =20 if (*clu =3D=3D EXFAT_EOF_CLUSTER) { --=20 2.43.0