From nobody Thu Aug 24 23:25:04 2023 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 4RWzhJ6jlWz4rjNn; Thu, 24 Aug 2023 23:25:04 +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 4RWzhJ6DQcz4Jhv; Thu, 24 Aug 2023 23:25:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692919504; 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=W3ra1KjF5OzW6t2m5gIpdrW61t9Hj5J7wFrwnQbL2C8=; b=yWDZHwUL3+IIV5YVXck0m6DE7jyoZ7hjmytgJhTmZMIYqTDzpUp4BLsXDHky3/oehlQsGv 3U7VE3fK+orqzBlgB7vnsjB8K0FtwPzKqJsUH9ZYvJX3smTsDxctg/CoB3Rk/uzc9jgD/6 qYSkLbvY3R98xX21ilBTsO01duFGfZausJ8GL6sVN5qoU38FA1+pIRqrH/AWumde3vfcWh dGTa87RRuMp4lnDd3T5pwLVgi3qXmrW6S9ShajlopAMAdHSivMa5cJKthKlOqMrapoOFkJ eOzjT3sAHu9SgayZ4lmj+ssWPt8kZxnocibBZSLtDmk/QSiTTrTSUROZU8xukw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692919504; 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=W3ra1KjF5OzW6t2m5gIpdrW61t9Hj5J7wFrwnQbL2C8=; b=tLo893nw3gPyAfY4UUxQ3LPT+sFDwJH/o7I4MFNIquHOERi/FRiGqe8ivGyOTCNJtH25AZ 7VvcpDM2ooRzoipbEPwkR86hiTumB32Akdnl31SA+5glb309Go3OjGBuzsOQ2qCfmHYbhd uAa32/uKUw+5shha6seGJrAMavkHQXkvZDXJFkuPQMYSTsd/W99lPKk8O+hXBYu5FO25IM IW6ee8Q0gPDngBmFGrzTucfrYdNR6TwQC3ZxUMebxA0ENXR0UhJ4DwUKhY6pP1ZbeV/uaC 0d9WjiJuz7pV/05RRNMnlN/me7obzgDLw5AOsHf1oau1/LF30l/4TNlPLn3chA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692919504; a=rsa-sha256; cv=none; b=jrgikJfxuNEy6UpRuCQqvCoWTy/P4NR6DTtV4dVtpE1/F3CamMw1swlpNNniYeP8w6M0Xw RokSvNuQ//evsxCKKxnFFZO2ZzDdT3Bl3+z4dUPG0aY121oh+/H4vBkcWaAtPI+JQGciWO h/nMQfqZV7n+ye2WKGKWx7B6kGDTqNv3olB6i6nMAnVD7V/uk8oJVAsDdX5SfLU/mYkzGO R9XtTePvoUnAsCg/E2Acg5Yl9suOcgj27JtaCOFzKVhTZc00k3FWTsSOkAlWvskTS51anh nZv9BZDEVvf+vObzXbtZRaLEWeorHX7Eumtjg+hd2UH7GJJ5n1VWEP9svl27HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RWzhJ5KLLzmFV; Thu, 24 Aug 2023 23:25:04 +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 37ONP4lt091900; Thu, 24 Aug 2023 23:25:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37ONP4ib091897; Thu, 24 Aug 2023 23:25:04 GMT (envelope-from git) Date: Thu, 24 Aug 2023 23:25:04 GMT Message-Id: <202308242325.37ONP4ib091897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: ca63cbbe9554 - stable/13 - ufs: always call ufs_itimes on close 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ca63cbbe95540bfcac3f6020ded5b5ed6522c6a2 Auto-Submitted: auto-generated The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ca63cbbe95540bfcac3f6020ded5b5ed6522c6a2 commit ca63cbbe95540bfcac3f6020ded5b5ed6522c6a2 Author: Mateusz Guzik AuthorDate: 2022-09-12 23:19:42 +0000 Commit: Mateusz Guzik CommitDate: 2023-08-24 23:23:34 +0000 ufs: always call ufs_itimes on close While here dedup code with fifo. Reviewed by: kib, mckusick Differential Revision: https://reviews.freebsd.org/D36522 (cherry picked from commit be931de6c99f346cedb7a364602f1cb654a32caf) --- sys/ufs/ufs/ufs_vnops.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 8483e3f01255..8eeb3ac84f6b 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -351,13 +351,8 @@ ufs_close( } */ *ap) { struct vnode *vp = ap->a_vp; - int usecount; - VI_LOCK(vp); - usecount = vp->v_usecount; - if (usecount > 1) - ufs_itimes_locked(vp); - VI_UNLOCK(vp); + ufs_itimes(vp); return (0); } @@ -2645,14 +2640,8 @@ ufsfifo_close( struct thread *a_td; } */ *ap) { - struct vnode *vp = ap->a_vp; - int usecount; - VI_LOCK(vp); - usecount = vp->v_usecount; - if (usecount > 1) - ufs_itimes_locked(vp); - VI_UNLOCK(vp); + ufs_close(ap); return (fifo_specops.vop_close(ap)); }