From nobody Tue Apr 19 20:23:16 2022 X-Original-To: dev-commits-src-all@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 9286411D15B4; Tue, 19 Apr 2022 20:23:16 +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 4KjZxc2x1Dz4ljH; Tue, 19 Apr 2022 20:23:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650399796; 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=BvGHO4Kn0nNdrb9/WZDQXgi5Cvfz6iKiMN6JLRfATK8=; b=PWn17XzYpk2RQcXVTf06SPi0S+sYyFi+tfATIOI7Bg0AW96Qz9dpQ32N5O6S0aIMBGlCdM qXf8S6aTOPW7qg/4aKtXvP4ARrTu1uEBVwUkmRw75MQd9sMM60J9+bvawI6R+KjwZqIxDB 31DDLkO1msDBlVzEedYqqdgR3bSswIKWHvj947cJ8fKQDLtLTVWOCbZLPs8EpW644qFtvq sYTa5XVg8yPt7OSvMyG+/1AmWiBqEBdRzAe/XFhwFXny3Hun4uUVOwvGaVdnjZ2lqNGN4P acmSAyfaX1qyWLqLE2s2FNsUDqd4cmME50z2Uw6lMY3M70j3jFlOlvSwAr2hBQ== 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 389902DEAD; Tue, 19 Apr 2022 20:23:16 +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 23JKNG63054746; Tue, 19 Apr 2022 20:23:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23JKNGfU054745; Tue, 19 Apr 2022 20:23:16 GMT (envelope-from git) Date: Tue, 19 Apr 2022 20:23:16 GMT Message-Id: <202204192023.23JKNGfU054745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3122e54a4f4b - stable/13 - Revert rest of a5970a529c2d95271: use vrefact() when working on fp->f_vnode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3122e54a4f4bcd1f11c3002421fead631915f45b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650399796; 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=BvGHO4Kn0nNdrb9/WZDQXgi5Cvfz6iKiMN6JLRfATK8=; b=jLzW19rPbFNivG1RwueDy874k4dXOYhIGmZPpe5JIKPiZNVFcx2EnZwT21Ie0jxCV0d5xS J1GF9CnqGyoY+JTfvJCsp9xTUEFeKj0uU8XdDgX2oOKNF//xPpe0+PZIjU3y/txLoWvAiL USTOKAI8MH8pUaRjOJiFZbwm4zcaGIEtlQLhdsED5lomrjcf2YU5NaoP/u9PVWhmfx+G6s DbaZPFCdSJxKdR/tFl4MlLRIDPVnpX6mQT3cEkVCqmRYTTKaFV6iGWgTOdwQSE39dLEZq2 OSiGG+bl/IxIS3p7U0RNHY09DcpT2GseRSLGkOti3xsTYdPIk6N2HBEHbvXJ3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650399796; a=rsa-sha256; cv=none; b=MfTRjoUFFddImOd45Agv0eNp60jXV9Z0sDva63u0Q7J+RY8ZXHSbB7sL/lQ2Y4OmIiqhpE +MX6/n3ce5yXlW1+/qqs8+pheXUebg7saQed5UKu88M53PO+1B5pB+3S3XShQrre4rQbOI x52fl3QRIvMHv1kOzkWSDFObkzX79nHa7GtYIDgkbg0SwxMLMj3yoQhoTy7P8yHID+zecQ /wVPt4B091kfXgzDB+8U75tadoNglkkq2oxbAOrvoA2bS21mRyylTXlg6SB79CrRZQvf/L H9+o6UfOkAHpJXYbhrt1cSDm/MJEubH17/nuRJoStiGNwz/zrqroF7tZ4yVtZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3122e54a4f4bcd1f11c3002421fead631915f45b commit 3122e54a4f4bcd1f11c3002421fead631915f45b Author: Konstantin Belousov AuthorDate: 2022-04-13 23:39:57 +0000 Commit: Konstantin Belousov CommitDate: 2022-04-19 20:22:54 +0000 Revert rest of a5970a529c2d95271: use vrefact() when working on fp->f_vnode (cherry picked from commit 362ff9867e9f0856a0f24f91e5fc6b9b3ecff8e9) --- sys/kern/kern_descrip.c | 6 +++--- sys/kern/vfs_syscalls.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index fe5103fc35d9..9d73417b7a3d 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3180,7 +3180,7 @@ fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp) error = ENOTDIR; goto out_free; } - vref(vp); + vrefact(vp); /* * XXX does not check for VDIR, handled by namei_setup */ @@ -3601,7 +3601,7 @@ _fgetvp(struct thread *td, int fd, int flags, cap_rights_t *needrightsp, error = EINVAL; } else { *vpp = fp->f_vnode; - vref(*vpp); + vrefact(*vpp); } fdrop(fp, td); @@ -3637,7 +3637,7 @@ fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, *havecaps = caps; *vpp = fp->f_vnode; - vref(*vpp); + vrefact(*vpp); fdrop(fp, td); return (0); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d90dd72c8ead..1463bbea87bc 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -896,7 +896,7 @@ sys_fchdir(struct thread *td, struct fchdir_args *uap) if (error != 0) return (error); vp = fp->f_vnode; - vref(vp); + vrefact(vp); fdrop(fp, td); vn_lock(vp, LK_SHARED | LK_RETRY); AUDIT_ARG_VNODE1(vp);