From nobody Fri May 20 17:25:57 2022 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 3C5801B388BE; Fri, 20 May 2022 17:25:58 +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 4L4YXk17mDz4mJS; Fri, 20 May 2022 17:25:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653067558; 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=NlX6tLZBKQQjcHcUQ34T5rR2fe6YQU2k5VAtR/kG11o=; b=LqTT9Gj1EZrQIwjvwDUnrw/7dvgVUAoNqAmowIZdJJcBBrXgrru1N9kYATamxDCaxuqUmg QD0alWj0l83FO/S/tQOVsDWiwmnIgNTl+IGSd90PmVL5dIYVbn4LIChu8p24Jfw/SOqt05 pmSMUmrj/O/0b3y1D5lPt0nbrUwpv81qcQ37SujbvUd72i64X34MJqwcdnz4+s2vNDkb8C UEiNxUgjlbxSkaL1s7pzyO6qtX62+7Ak5iGkbwa0ASmhIqZ/Qnvt682LVJCtjRhNfeWdka wdgG9q6VfRmEdVaumpJNR6MHruA+sbmy1KWZhaIhht7MzPB6/YSO5O0XcEHZFQ== 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 0702D163D3; Fri, 20 May 2022 17:25:58 +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 24KHPv9O058755; Fri, 20 May 2022 17:25:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24KHPvxu058754; Fri, 20 May 2022 17:25:57 GMT (envelope-from git) Date: Fri, 20 May 2022 17:25:57 GMT Message-Id: <202205201725.24KHPvxu058754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 6b715687bd44 - main - vfs: make sure truncate always calls NDFREE_* 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b715687bd441f2815ec93dad7efd156fb3b591d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653067558; 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=NlX6tLZBKQQjcHcUQ34T5rR2fe6YQU2k5VAtR/kG11o=; b=PpyjwaoPIIKAYAVpQraF0gVZQec2WFB9Ck01A1je7Yh48BqfoGAjS+Nkfx1c7cXtewtNLy Dd7gtN7N8gQJlsvw0z5rLM3aSF3Ad3cowXiLctHibZJUmnY0DlxrjTFGTF74AvhqeLpNgS cHSmqVETT3YV1SUJ849EmRl+B6dZD9eCep4ZUXRZRfeAf0heT9NNTlK5eVnS17uaxm4eyX rZokJJomnb3gfi0G0lJTLjVo6r4Us44F1GamirAWCTYm418ukl8kC+ak/4eVODrRWryrni X82cUKqb9S31/0qHvbLwSR527jS+QjEhPycpzoTS97yOcywdnj0xKz82G1w0jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653067558; a=rsa-sha256; cv=none; b=XdCzyq/yIMFcv5h+j1NJGotXkjz7n9emU+t9LgWn6pzbuxslWZaereA/yKl1EBLS1mOGpK t4tVvXqJ/v6k+fQXAGpzPD9YXya/0B8FmyZPt5ZXpTRRwxQxXHoRuBZLUbl6mhPiVLgyHO yW/XVRlvEJAFuoJ6j7oMZ1ThVvoQKNl1FxAdRxHqJaHldrFIJlv3trXD1VlkLu+HRJJXda A6K/2Rjtdvq6H2qlDK3IMo4Lkh5hKtomDhqr9N1K12oBt8WC8iTrgIvQV6lc+lCrx23bwZ CkAnMlbyNUAQVpZX6WtIBOts0x2hPVNAqjAI21V9zgKkOjYFFcGKNpgDPh3Z1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6b715687bd441f2815ec93dad7efd156fb3b591d commit 6b715687bd441f2815ec93dad7efd156fb3b591d Author: Mateusz Guzik AuthorDate: 2022-05-16 01:16:17 +0000 Commit: Mateusz Guzik CommitDate: 2022-05-20 17:25:51 +0000 vfs: make sure truncate always calls NDFREE_* While here convert it to NDFREE_NOTHING. --- sys/kern/vfs_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index ccc14bdc0382..86ef3fc7a095 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3472,13 +3472,13 @@ retry: if ((error = namei(&nd)) != 0) return (error); vp = nd.ni_vp; + NDFREE_NOTHING(&nd); rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) { vn_rangelock_unlock(vp, rl_cookie); vrele(vp); return (error); } - NDFREE_PNBUF(&nd); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_type == VDIR) error = EISDIR;