From nobody Thu May 23 00:28:03 2024 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 4Vl8CS2GYdz5LLLW; Thu, 23 May 2024 00:28: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 4Vl8CS0FK3z4hV5; Thu, 23 May 2024 00:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424084; 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=aQJ/aTp8Zkbx3VI7+h83e9vZLMAPKMKZiZrP7p7rlfI=; b=iMMVpmVFV6gvhdq6lHuRjNG7jcL342AF5v+lZWB6RumvZOPIgpXLMDs4rbB3k3n+FfptC7 qMlDjW89LfQGDzoiJ2+GsyDtn2ja8AA1kkYm73z12tiLn/1/E9YB6ILvKjD8hmI0ECDJVc NRp8MdRnar9tKWUU0gTW2jvlG3OoC00dOx+o6bNFkO2GHjcrjcPSVjF7Ro6mpmh+aSd1IC IsUatpYHFkc/XivdlJoOhVvyfHf4s1qYC7Oun81YDDpg3DvWzEX5mxpNq7MMYTtOkXVjuy xYI4jTeEtNsvoBevzeB7xATejDKHRXq7bBAAlx0bW9Aj3/MQCfeuXF6ryV7oNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716424084; a=rsa-sha256; cv=none; b=Jr//tN+q2ArQh4cRPc6FG/LJ1Gk5y/JHJUjxaBnzXOrUq5D/EsQ2ktB0ZDC0phf5A1ee/c BwrUvW0qYzlz3Y3ketTpO4Nc1bmThsG4F+UBKixqaQL2bcdDMlTDWHflX0Dzegr3eKikdO vrFpOIdi7eXwZ972wlznZlhpsqh2jQBAeNcyoI+XH6mjrjf+dxqtKMl5DtyGGXoPPqSnRJ Cu5j4FdVEzBTwFE34OJ5L8hxM1wndKy1QxjzVL8k/O/tvhP7+blpNUXixjpV9V/Azm6FJ2 QEn1EBOHtSXNRfQt/S1r4GhWz+oyrrW2LdR9RG8RI2231WvJViKXIfWqBzXwjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716424084; 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=aQJ/aTp8Zkbx3VI7+h83e9vZLMAPKMKZiZrP7p7rlfI=; b=C6KQS6D2GdMDYw9ZeoKbztk8gi5UDB56h2HZmD7WTyc40hM11vfRSXIP1NUEG/+meMebRj iPrvadnhKp+jIC88jSZWObscs9KGis5RnXzHzNIik1zwNk+Ix7PJHERGHRUS9RoDU1Y2Og us4ZI5TjGlv/kTfHGhLi3f053BSId2ZSmItsLwd9603Yc1272vWHprYIOfyA5esrFx5fEe FuyKti+bfe03fUg+CKmCt/Ne4XLInS9+8BSMCmRa6zt8bd5fcFp/b6kwY51x7u8Be3Nihx q6HK8g5Ke9ficU5mDYjYA1ypI8Bz6tFTWytlvgCP0EFdtKa/1yE3WmU5zBtWaQ== 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 4Vl8CR6zT9zRhZ; Thu, 23 May 2024 00:28:03 +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 44N0S3S8021079; Thu, 23 May 2024 00:28:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N0S3TX021077; Thu, 23 May 2024 00:28:03 GMT (envelope-from git) Date: Thu, 23 May 2024 00:28:03 GMT Message-Id: <202405230028.44N0S3TX021077@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: 2a2f2f59132a - stable/13 - vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 2a2f2f59132ad365203c5deb8ed16202a78585c1 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2f2f59132ad365203c5deb8ed16202a78585c1 commit 2a2f2f59132ad365203c5deb8ed16202a78585c1 Author: Konstantin Belousov AuthorDate: 2024-05-15 09:54:49 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-22 23:47:23 +0000 vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done PR: 265311 (cherry picked from commit 21ccdb4119afdfdfeaa80e9c8514171c65b35862) --- sys/kern/vfs_mount.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 68b22d1a77a8..8cee38c7ec2e 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1155,7 +1155,7 @@ vfs_domount_update( void *bufp; struct mount *mp; int error, export_error, i, len, fsid_up_len; - uint64_t flag; + uint64_t flag, mnt_union; gid_t *grps; fsid_t *fsid_up; bool vfs_suser_failed; @@ -1237,6 +1237,7 @@ vfs_domount_update( vfs_deleteopt(*optlist, "fsid"); } + mnt_union = 0; MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { MNT_IUNLOCK(mp); @@ -1258,6 +1259,11 @@ vfs_domount_update( mp->mnt_flag |= MNT_UPDATE; } else { mp->mnt_flag &= ~MNT_UPDATEMASK; + if ((mp->mnt_flag & MNT_UNION) == 0 && + (fsflags & MNT_UNION) != 0) { + fsflags &= ~MNT_UNION; + mnt_union = MNT_UNION; + } mp->mnt_flag |= fsflags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE | MNT_SNAPSHOT | MNT_ROOTFS | MNT_UPDATEMASK | MNT_RDONLY); if ((mp->mnt_flag & MNT_ASYNC) == 0) @@ -1361,6 +1367,7 @@ vfs_domount_update( if (error == 0) { mp->mnt_flag &= ~(MNT_UPDATE | MNT_RELOAD | MNT_FORCE | MNT_SNAPSHOT); + mp->mnt_flag |= mnt_union; } else { /* * If we fail, restore old mount flags. MNT_QUOTA is special,