From nobody Sun Jan 22 09:19:15 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 4P07375pl8z315Ps; Sun, 22 Jan 2023 09:19:15 +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 4P07375DGfz3PYp; Sun, 22 Jan 2023 09:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674379155; 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=/A5O3mEQMn+q4t9gTZZoSy48X/cXoAwA2lbuXZf7uMo=; b=w0YY18B99Ay5W1VAhoGQFZwkUBrqoKbmApdrstAAXv5j5Fva0BzMSunKi4ZZfBna1IuQY2 VKgg/9tHCCyTTCh3F8dAlwWSfGuTGk+JZMHWqxRDLB20+bkqEcJ4HXpkbO4YVIi69z5oUD tnDPSQ/WCPcetn7iN73dbwXuIQEu1Q0okIBFE/0300UyDk+jhd04F4Kaa5qj1Kg2KA3gXy ES5HFJ8btfx0cp4j8ts8Q7KINMFclZd6EzavMohpttcc6MXDE46x6i1XbGNE+IPaMQoDON hhuJhXglcxrn60Y3WY+MwNjdneJb7NsZ2G7PB70LqV+k8Hn2ymh9D1hF4D4jVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674379155; 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=/A5O3mEQMn+q4t9gTZZoSy48X/cXoAwA2lbuXZf7uMo=; b=yk8vM+AUUdnXtyirCQi4UHQn5hyvOlil3lVHeFAlJICRAy+K9XMMg2GNhgaImOHDa126Yy zbV3DsAYmqz5bAfWyVfRNVgqdKEUERRVcoge6MfhIgga82+gUSMGFbY3RiY1Zmw11nAC/j UHMf+5Uo4b95ECHJOZYprRHJ3w7J89eO1lEzgciaVzKtyudxtuJvPGfpmdlTQhaWRNEBVM I6Y681gJulcmuPVaBxHB/6GoSZVf9Hpenyc7RLZ059FqZbNbKpVFJGU69qgTq4sJXR87sE cW04Zn4DJi/kaPziEorAkFUrGVW+YCw3JmZ2StQwTWhCsKjYNYLSt3a9DwauFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674379155; a=rsa-sha256; cv=none; b=fG/uNjqLa8jVF3cOcaz7PUfpQ4oW7J2qbrJ8ardnKOBpGdE1KCv/WZr3/bHIssxWM3sjyh ygsHM9/yZS4qF9C9fU8rQeNJhQBMBvSyrqKkWUFek8Brzsv5zEikHnWLdrRCpOgSixw3Ke UIccWM0FY6akESZuzpsIzxaKDBoxMd2pVPsDRaQ/ysaRZTshWXM98FKFnBaiUt0R6mLq5I 4dN4k1aNALlAz8/AmnBdfMmxhDbTNax4u8dJIkdFr++jb584y1SVS21Jco5gCvQaF4BBEo D+VWPp5/OEuSPhE79dfCrU7CwtI/mqHy16F1norksZveCaksvuRMc7ohkvsF0A== 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 4P073741nbzk3w; Sun, 22 Jan 2023 09:19:15 +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 30M9JFxd044171; Sun, 22 Jan 2023 09:19:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30M9JFUP044170; Sun, 22 Jan 2023 09:19:15 GMT (envelope-from git) Date: Sun, 22 Jan 2023 09:19:15 GMT Message-Id: <202301220919.30M9JFUP044170@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: cf8da8b04fe4 - stable/13 - ffs_syncvnode(): avoid a LoR for SU 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: cf8da8b04fe4b2b4c616060463db14281d9e4434 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cf8da8b04fe4b2b4c616060463db14281d9e4434 commit cf8da8b04fe4b2b4c616060463db14281d9e4434 Author: Konstantin Belousov AuthorDate: 2023-01-07 12:22:18 +0000 Commit: Konstantin Belousov CommitDate: 2023-01-22 09:18:09 +0000 ffs_syncvnode(): avoid a LoR for SU Tested by: pho (cherry picked from commit 6e1eabadcb1d554ab6c0ad8ce1d82f6748cc80b4) --- sys/ufs/ffs/ffs_softdep.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 5b489d4bad36..d784d8d0fd1a 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -12758,9 +12758,15 @@ restart: pagedep_new_block = pagedep->pd_state & NEWBLOCK; FREE_LOCK(ump); locked = 0; - if (pagedep_new_block && (error = - ffs_syncvnode(pvp, MNT_WAIT, 0))) { + if (pagedep_new_block) { + VOP_UNLOCK(vp); + error = ffs_syncvnode(pvp, + MNT_WAIT, 0); + if (error == 0) + error = ERELOOKUP; vput(pvp); + vn_lock(vp, LK_EXCLUSIVE | + LK_RETRY); return (error); } }