From nobody Mon Feb 13 22:31:41 2023 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 4PFzbL1w0xz3qW1L; Mon, 13 Feb 2023 22:31:42 +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 4PFzbL1FP6z3FQr; Mon, 13 Feb 2023 22:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327502; 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=MB8dE1Oye9/WMnST/bhHTkEEm/35sTGj4K4hb0/QWGk=; b=a/RjkBfrwc+nvQ7UbAvAvUB8ki9qDDm3joJZ8S49vHwexjyJEIXJhbvWjWZyo04pto3Z+m vOpdVdcGe5kQmenkT11/4rjOWpWdBd9e3hDBpxGLuRNjfhaXmhvSvJnQ4+ACUMwvtnoQ/M 1n61/g9K2trOBGn0tXT47RgoEA4MLCmpzAUrNNxxAXevEzZFtcfxuz0Nu+2+Xddq0ENsLI eO5ED+PnO52HyQaBE92n4N6NZX3piRsl6PVBckxae/k2FumC07hTFs4FVjlcWqTV5pe506 pLDWuAsaXcKt2mpsrYGy6eyFwXX8h8q68TVLKWduU4TdNUu5MZOtXQyHQzmX4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676327502; 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=MB8dE1Oye9/WMnST/bhHTkEEm/35sTGj4K4hb0/QWGk=; b=X3TUuttKdvk/VaOJfLrFg/qxr0Hz+2TRPO5CfcCs/kSljSyKBOpgTYDFhHutl9MLovnJAk GfLnZJtG37/5T/0TfoSsfOwFvRWxHqjr5YvgM+Q7AJaglie+mbNGt+5seDJDkcT/suKM9l s+P3xV0bpK12RP/Pve0/JH4V7pyHhdk6GPiriV5iK0dZvvKacUj/nx5xan9zrgm2YaqcXU J2REyy2u8psODff+Ru/1+Ugf4Y5tc7oqbyYrm7nXtN+REugpxple8uT8T7qcQAkieJ4l+0 g5s6U/qR85LJVo5/TjDNp69y/grLTjZoq9ZEvFJejea6aLjZCtjXFxPPttwWFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676327502; a=rsa-sha256; cv=none; b=gnoWGzFIHmqeePwJbR7V17Bmkdi5hXbvC+sSl1uxrMQxNDViU7s7UbsldVgtO8kE/8SVt/ eOnS8PcZ8RZX3PTRESveosiemxhvXdvcMMfTNyhBo1pO2nrx+b+vY6qFAKr0XL3Nik3PBD w2a8/4W6yljpQjjQgNNGjc7gWm+mUJlGMZfK2wQ5jYMZrbyKCAu/W9Zha11ebF/GVPr3DK Y1iHJmUzrCsvVNrApBEo2Mj03Y1ThKw5xnH1+KjOaZ4DDZjA2XtPpnsT/bY4nwd8t6XJwj 0y+Zb/IVZseRj3BThoC5wCKihW+JlhB2PWNpvpAr5/lhaNECtMGFvGeF0+wHDA== 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 4PFzbL0KvxzbmP; Mon, 13 Feb 2023 22:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31DMVfbp080751; Mon, 13 Feb 2023 22:31:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DMVfJn080750; Mon, 13 Feb 2023 22:31:41 GMT (envelope-from git) Date: Mon, 13 Feb 2023 22:31:41 GMT Message-Id: <202302132231.31DMVfJn080750@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: 67dc1e7b0457 - main - msdosfs deextend(): memoize DETOV(dep) 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: 67dc1e7b0457ec014a1291c5874decdefe7bffdd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=67dc1e7b0457ec014a1291c5874decdefe7bffdd commit 67dc1e7b0457ec014a1291c5874decdefe7bffdd Author: Konstantin Belousov AuthorDate: 2023-02-11 18:05:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-13 22:29:32 +0000 msdosfs deextend(): memoize DETOV(dep) Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38549 --- sys/fs/msdosfs/msdosfs_denode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 6c38481681de..0b4135d60784 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -496,13 +496,14 @@ int deextend(struct denode *dep, u_long length, struct ucred *cred) { struct msdosfsmount *pmp = dep->de_pmp; + struct vnode *vp = DETOV(dep); u_long count; int error; /* * The root of a DOS filesystem cannot be extended. */ - if ((DETOV(dep)->v_vflag & VV_ROOT) && !FAT32(pmp)) + if ((vp->v_vflag & VV_ROOT) != 0 && !FAT32(pmp)) return (EINVAL); /* @@ -528,10 +529,10 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) return (error); } } - vnode_pager_setsize(DETOV(dep), length); + vnode_pager_setsize(vp, length); dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; - return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); + return (deupdat(dep, !DOINGASYNC(vp))); } /*