From nobody Fri Feb 23 17:38:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ThHKN5ZKvz5B9l6; Fri, 23 Feb 2024 17:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ThHKN50JVz4hpw; Fri, 23 Feb 2024 17:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708709880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xac9xJnrWYcre02Fa6p7ErCuUaVpUv4gxbWeI3mztzE=; b=AANF3ud/DFfQ4zz5sOmYDl7B6WykR68n0Ywjny97RQju5RPboeBF6ztz+IWLbimXQfThKC odfUkZxVwko91EV2s26uMbEHHqXhDwIN39t8bhuqUZZwn0iMHL41WBGuQAx64k/CyFpaLu SIEWHasEWB3IcldsDWKFvrQrAA4/Stsn8LatJyxcgdCltql8OOd3LD6rNsI8p/K7xgbpqs c7RU5EpVZ7WMuvJHza9MjtHQaWj6umWsgDJbixGdkqRDB923f75/FfbAJkV0OLjx2TXFXV xaA/wFXEWu84IbiL2TCXVa6wTxEPRNgO8sD1fpN/kvwF6X6FMEF0R3dlevAKnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708709880; a=rsa-sha256; cv=none; b=qivZ9QocEcxnKYuLemDAlxTL2OwHNyqz0e3MyEAFsqWzhahFb/R/VS+MrpIn4uAceKYMRO ZGlN5bXmWwdCoptLNA+QZNGOXSbaEGyQjQN0AKLcigWBvEsTBBxuU/MP3bk9c5iFumFzG+ M1MSV6Y4/Dy+ec3Hk4WbKk+SPTHYNfTaKV2DFUwxQXXq35260NdBq/0msnyrs3xGxsaPnp NowarAwtCEEiNbJxaUCEleGDtYjMp9xRHxcvbqsvgy0sbM3RN+g15TfAWj47tom7N6bd1c RO3aNLxbRRm/7vgJGQoBvH4TA7w7Kocnr0yd/tCR9PdyXuR4kjNsH40/OImCpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708709880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xac9xJnrWYcre02Fa6p7ErCuUaVpUv4gxbWeI3mztzE=; b=mJVeeC1ARwEgvlqaXR8S67UoSSJ8fWCmohCc1MgjY8mxHMbmmjpmPB2IdsXO3Sa34Hhh86 J0z6MuJO5fey1iswp5bHUBeJKNMtIGuH5VO9BhOyA8gu4EQlH0AfGganRqkCr8ZsgwxI1W 5xUfMY+UAUiOe9JBghMvuLJWbGWA3B0pkspKz+sEBDWvbzLFGfRaUFOf2Mt/Wpa2Ztrc1U dHYsO/nomx4WhhvW8kGkyVL/v1IC+LQoDNppT8JBFfmHnr90wUafdPIhMXcmU8to86by/r DkHjw7tYpPicTm60DtdnH0JYP1yYb0ohUvQn95LV3M7IIJAc9sM4PfxP4z5BQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ThHKN43NqzPsF; Fri, 23 Feb 2024 17:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41NHc0cx084415; Fri, 23 Feb 2024 17:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41NHc098084412; Fri, 23 Feb 2024 17:38:00 GMT (envelope-from git) Date: Fri, 23 Feb 2024 17:38:00 GMT Message-Id: <202402231738.41NHc098084412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0085afdceb17 - main - fs/msdosfs fatblock: use ulmin() rather than min() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0085afdceb17cb7d4e41f9073299f688372c6a0f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0085afdceb17cb7d4e41f9073299f688372c6a0f commit 0085afdceb17cb7d4e41f9073299f688372c6a0f Author: Konstantin Belousov AuthorDate: 2024-02-23 17:30:10 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-23 17:37:52 +0000 fs/msdosfs fatblock: use ulmin() rather than min() to avoid truncation of pmp->pm_FATsecs. Submitted by: Robert Morris PR: 277237 MFC after: 1 week --- sys/fs/msdosfs/msdosfs_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index 4a7faa9e1f05..bfaff417f677 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -97,7 +97,7 @@ fatblock(struct msdosfsmount *pmp, u_long ofs, u_long *bnp, u_long *sizep, fatblocksec /= 2; } bn = ofs / pmp->pm_fatblocksize * pmp->pm_fatblocksec; - size = roundup(min(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE, + size = roundup(ulmin(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE, pmp->pm_BlkPerSec * DEV_BSIZE); bn += pmp->pm_fatblk + pmp->pm_curfat * pmp->pm_FATsecs;