From nobody Thu Feb 03 02:58:22 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 9192519A9047; Thu, 3 Feb 2022 02:58:23 +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 4Jq3Jb0C8Xz4kTx; Thu, 3 Feb 2022 02:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643857103; 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=hu+ApIE4xIvi9Ub5VOM+8AI6BwF3BPXA7N1Z6VkIhm8=; b=iMowUvIrnlrZGzxHvG9hFXGPQJp9C5Dnq9zPB0NxaMDOKH79Mm91vQWh2HtkWdHUCHS6Ul cdUUWK3+xScLee2e+2Vc//M8aNg6HCQ5u/cPhHcgol4tPFYbXNuq1ci7Y3IqCg7suhLkrT KfzlvxqUimgdOzY2YdPXrZb96Agq86iSV+J2JS05NR8ZXqQ9KDl6Okk/a7G+PpEfQEb5/c eCa6IC/BMZRxMaFyesvhWFllHJzlrrvtQtTokOXBtQSCJVN69bblXlBGZbbEYkjdoqS0/3 DA0v8UBLTd96NFwhqJkKNrilhKGQMQJOBbMb9lAD6gQ0wBMhFt9AebUlqZ6+8A== 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 B91EE7E58; Thu, 3 Feb 2022 02:58:22 +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 2132wMrp000516; Thu, 3 Feb 2022 02:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2132wMxp000515; Thu, 3 Feb 2022 02:58:22 GMT (envelope-from git) Date: Thu, 3 Feb 2022 02:58:22 GMT Message-Id: <202202030258.2132wMxp000515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 83d61d5b7300 - main - unionfs: do not force LK_NOWAIT if VI_OWEINACT is set 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: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83d61d5b73005b574eb41a291cb5a2a7d6ff733c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643857103; 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=hu+ApIE4xIvi9Ub5VOM+8AI6BwF3BPXA7N1Z6VkIhm8=; b=twrrO2fzBk7EqyTF0m0Q+DcSF98UDYsrFhKMnuyjTODCgahhn1a1zm1s744wSuPiXPmHcI iccS8wmo0NUNh+N9WVQUYEQJBOpNmzV5MRcGhtO4w5GZxddVU2Htir4eFfte1X3DZd++ZJ D2NeH+GbyeHoATS+oS9jKqsoW90nDL7BC5cHv9H9jrxY+1uvdMfben6EHo/+nlfKfT7zND 2hPaYzfW7HPHz9J0wQG7b0UcbRC1Sc1G2Ufu7gTTQmiqaXg45Idf9qUYG2EhgSgXNUKY9i +yh3mUKqDNaNUl/267YfMEsgUkp13Upp9SbA8loBUi+z8pXJq8t7wYHl6oLzjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643857103; a=rsa-sha256; cv=none; b=fKZ97+0St+rGjBR/AX/6ZqPYQjaU+JH8J34K8xUbmzqKNRRCtQTCx1rFIjPN5DEjRiaFIW e0KU7m3lbOuKLrLOh8K22efnZQS4PbqHKTL+GS2j5kb0p5H29WOuuCNuVHcvomLMfznbR0 dL8nfcbhdHY3ONdle56YxLpAx8BiNsha0NOWdw+GnPmSJ8MIhKXOVTRnhSIhJkO8znmNpD fi+xsCVpBDoVVDG8swMHPxQFcvPwCHKfRgLPbFHQR7SzyXnl+ukI3WUxXxtPGK29sZ6hnm 5H8tJsF0++mPchNERQYoYLMTP+laBXw3Upz2/52+zmOc/oyi1xcJPH9axzlwjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=83d61d5b73005b574eb41a291cb5a2a7d6ff733c commit 83d61d5b73005b574eb41a291cb5a2a7d6ff733c Author: Jason A. Harmening AuthorDate: 2022-01-30 21:03:18 +0000 Commit: Jason A. Harmening CommitDate: 2022-02-03 03:08:17 +0000 unionfs: do not force LK_NOWAIT if VI_OWEINACT is set I see no apparent need to avoid waiting on the lock just because vinactive() may be called on another thread while the thread that cleared the vnode refcount has the lock dropped. In fact, this can at least lead to a panic of the form "vn_lock: error incompatible with flags" if LK_RETRY was passed to VOP_LOCK(). In this case LK_NOWAIT may cause the underlying FS to return an error which is incompatible with LK_RETRY. Reported by: pho Reviewed by: kib, markj, pho Differential Revision: https://reviews.freebsd.org/D34109 --- sys/fs/unionfs/union_vnops.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 28e306fdb3f8..8e881ffd19bb 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1952,10 +1952,6 @@ unionfs_lock(struct vop_lock1_args *ap) if ((revlock = unionfs_get_llt_revlock(vp, flags)) == 0) panic("unknown lock type: 0x%x", flags & LK_TYPE_MASK); - if ((flags & LK_TYPE_MASK) != LK_DOWNGRADE && - (vp->v_iflag & VI_OWEINACT) != 0) - flags |= LK_NOWAIT; - /* * During unmount, the root vnode lock may be taken recursively, * because it may share the same v_vnlock field as the vnode covered by