From nobody Mon Dec 26 18:29:19 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 4NgmXH6McYz1HKSm; Mon, 26 Dec 2022 18:29:19 +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 4NgmXH5vBcz3jkB; Mon, 26 Dec 2022 18:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672079359; 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=w7zbfHR9w+VwBAtsMQyTzuiJd4fd99RKGNreOo9RCAo=; b=a3a2iwW5hQFXgI80I+Mu9iOE1ny1LmDuJQOC24O/tqOlvPSPUnvgWgxx9f4PyqY9IjbKIu aeotWVpQIZJFXQgRFdGYhnRg9K0hXMop+08kqIpJz8sbd8LFIoyYA2euhPxnTOjhWpA2WR BwwLeH9fjZENOpB0qeqG4YwNWJMLB7LjXyjlJ6/ScLNn/Zl3mRYfT9TDoZJzIV3tZMI/sY /gkSMvV8Qj3vgWDYtD2a4NafFkWU3SdmLeOR/gzETSVf7VHGHwAcN8eZk9MgrnxW6G1dZN 698vGppv3Bcqrz0jHkJd8RsA9xf+ul/eivYBW0diEGN/1di47dEJ4FSsV/FgQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672079359; 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=w7zbfHR9w+VwBAtsMQyTzuiJd4fd99RKGNreOo9RCAo=; b=QG/SBw5QxAiD+59LAzp44uoVxqPYJ5v0DwnovqbuNd+xbrTjFcv2BBUOpN6LXsWrdav4/Z /EDSgQMfpqC3sg7QoDyKlDh4pY4WYurKpz8fQ7vMorjLe5YqUNe1d//o6NlVNpSMTmRDs/ 3Rlkz5IHZyEu7n12Q8F5mjl4SbDbxfllmfHMfw3WwcSrCB2K4dA4tEDcD3hd7vz9XNM+3k NyPs2QgxGKdjW6SPzD0hiY9/F+y5e3YZ6YJQHc7gfHOnsgAFAdGZLEhMp0q1kam1FKEqCP hSwxwuUsNsrr3Yd66E4fHDzwoaxefjgRcy68CAzPR0EQBUYk5Isjmm4tJLQDmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672079359; a=rsa-sha256; cv=none; b=TbtIONlIAtrUQUEL+mOKnw/NfSuxp61dNaawUbbvnHsHHqrs/W+8G4noDV5j93huCK4UYi 1bPZRCB+VHS39B+CkWSreA9DBXRSJgEeiRAnxSZnlhPTGwro/sKkp4dI5f7YmH4eChXwRP /tlmOLUbH1VTQdkOOzZJ5lyHvqhlCvd7kg5aRDj3ucLgz27XIQpLuUAD+JpPJuXJTRFo2o A4Dv4ORXCMQ8rRwcwTtz98EP/M+HnmDcOXk+gZcRKYLsbIeC35ow8++yhMecMjoLKX2E8z VZintIoJUmkkcMBSOUaagJhHg6ExkVYU5DNjsPiB9ySXkbNH0u4xJP9UVwTL/w== 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 4NgmXH4h5dzh8r; Mon, 26 Dec 2022 18:29:19 +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 2BQITJKt040041; Mon, 26 Dec 2022 18:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BQITJre040040; Mon, 26 Dec 2022 18:29:19 GMT (envelope-from git) Date: Mon, 26 Dec 2022 18:29:19 GMT Message-Id: <202212261829.2BQITJre040040@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: ed1bb254101e - main - mntfs: change mntfs_allocvp API to relock on its own 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: ed1bb254101ec3107d00257209204f8497fb0c1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ed1bb254101ec3107d00257209204f8497fb0c1e commit ed1bb254101ec3107d00257209204f8497fb0c1e Author: Mateusz Guzik AuthorDate: 2022-12-19 14:42:04 +0000 Commit: Mateusz Guzik CommitDate: 2022-12-26 17:34:49 +0000 mntfs: change mntfs_allocvp API to relock on its own Reviewed by: kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D37759 --- sys/fs/mntfs/mntfs_vnops.c | 2 ++ sys/fs/msdosfs/msdosfs_vfsops.c | 2 -- sys/ufs/ffs/ffs_vfsops.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/fs/mntfs/mntfs_vnops.c b/sys/fs/mntfs/mntfs_vnops.c index 4eb12a679590..0360262ce191 100644 --- a/sys/fs/mntfs/mntfs_vnops.c +++ b/sys/fs/mntfs/mntfs_vnops.c @@ -83,6 +83,8 @@ mntfs_allocvp(struct mount *mp, struct vnode *ovp) dev_ref(dev); vp->v_rdev = dev; + VOP_UNLOCK(ovp); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); return (vp); } diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index dfe31ca18b9a..b6f8c29d9162 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -431,8 +431,6 @@ mountmsdosfs(struct vnode *odevvp, struct mount *mp) ronly = (mp->mnt_flag & MNT_RDONLY) != 0; devvp = mntfs_allocvp(mp, odevvp); - VOP_UNLOCK(odevvp); - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); dev = devvp->v_rdev; if (atomic_cmpset_acq_ptr((uintptr_t *)&dev->si_mountpt, 0, (uintptr_t)mp) == 0) { diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 54a24b7058f8..cec03a3beb0d 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -925,8 +925,6 @@ ffs_mountfs(struct vnode *odevvp, struct mount *mp, struct thread *td) ronly = (mp->mnt_flag & MNT_RDONLY) != 0; devvp = mntfs_allocvp(mp, odevvp); - VOP_UNLOCK(odevvp); - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); KASSERT(devvp->v_type == VCHR, ("reclaimed devvp")); dev = devvp->v_rdev; KASSERT(dev->si_snapdata == NULL, ("non-NULL snapshot data"));