t-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=29mPZ/qD3icruHUIw2AdjowCpL2/GGQKGggK0zAsy4M=; b=gRertx/sfLNtnBjy9BuyN3eDPHn82spqx7J82vN38EIzCK0IegsiffKMQTbZWLlQds1DtD vFJ5jS+MB3Fn2kpl5MHWkfR/9xa9V+EuXCVM745Al4JMmyHpgzf8XnC8lPgQEchSw2Hj1h KqTqo4Ug3LNtohi/ED5QpgSzf4tvjp73DCBO0TVM3+NDhfuqMDj/is7UjGGvX59p3jVZuh xVLKqBrU3yYgoR9fm/ZC9vD13Kir6IQeAIBOqwdA6P1X4U7MxYxk21PMV1OnZYlyf1tpIR S/EPcvzQ1qps2GMiQAt9WHS2DCTFlWHYk7v61e0Bx+hvynCod7N9NPFRQ1g9RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760581350; 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=29mPZ/qD3icruHUIw2AdjowCpL2/GGQKGggK0zAsy4M=; b=wDVb+PY6B/6LCqsCLqgq58lkGwWSvmVXV7xzrVlQ00UqlejcddPC2d2Wk47wnLk8Lythxn hRIL133IgX3X6JO8QmmPeYb62KIBiUN2kRThwNw8f35Sqi0mzHMO4CFceOr5rtKDz76rJZ 16yiphQvhRn9+/2uUaLMC8jX/iBqXE2nSkaSKbHofY2VjkDlrC0HqXNy2WGhCBjZ1M5YEU h9hzNzOI5f3XsosWEgJHRd8RgN4bRxedjriSNbUlvJ1BAaX+XH8rWloqJBzb0XLod4pXRQ 3Ewx1IhNHVBwmXTcNhZV+hYBWiFeShc5ICBSSo3eban5N+Ekc64om+NrRCdRDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760581350; a=rsa-sha256; cv=none; b=EXG5cfR3xwjWvXngQFqj9UKK+EYTgbB6RI7fmiH23aaQ4pdzq/E1M2WNtJbqrfq139rP3v Zdf9tYa8SAaIaXFX7kKfNnU3uuNXlOd5FXGYYlXRBnit928eDKJEcWoaxbY34897TAD0fM +JOICFpeO9n2Bx5rwtmA2A+cwLgqLnT+GxShHBXuRfB/Ito0kIKmiYRB/6cVHKYnk32q9U Se8ejpNNANx/IYii+akrsB8DrFAOzksypJC+5VuijAJty9hlmuAakQxLJACJiHHeFRfN7Q y1zcTh4GwsqcXixvxjP16W3dtrQIAX7+fSVv5xGZAZXLHVDoeC+Bq+9oQGar+Q== 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 4cnBYf0VlXz14Mn; Thu, 16 Oct 2025 02:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59G2MU8c017913; Thu, 16 Oct 2025 02:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59G2MUbl017910; Thu, 16 Oct 2025 02:22:30 GMT (envelope-from git) Date: Thu, 16 Oct 2025 02:22:30 GMT Message-Id: <202510160222.59G2MUbl017910@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: e9a48e988e2d - stable/15 - nullfs_mount: use symbols instead of string literals for cache mount options 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/15 X-Git-Reftype: branch X-Git-Commit: e9a48e988e2d65827d4278e3b3bf437aea400827 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e9a48e988e2d65827d4278e3b3bf437aea400827 commit e9a48e988e2d65827d4278e3b3bf437aea400827 Author: Konstantin Belousov AuthorDate: 2025-10-08 15:44:59 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-16 02:22:20 +0000 nullfs_mount: use symbols instead of string literals for cache mount options (cherry picked from commit 8e6f6a5fbde78bd8d19445ee6ebaf00b8f4f5aa9) --- sys/fs/nullfs/null_vfsops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index e2dabd8e33cc..483d4182e65e 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -85,6 +85,8 @@ nullfs_mount(struct mount *mp) char *target; int error, len; bool isvnunlocked; + static const char cache_opt_name[] = "cache"; + static const char nocache_opt_name[] = "nocache"; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); @@ -205,9 +207,10 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } - if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) { + if (vfs_getopt(mp->mnt_optnew, cache_opt_name, NULL, NULL) == 0) { xmp->nullm_flags |= NULLM_CACHE; - } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) { + } else if (vfs_getopt(mp->mnt_optnew, nocache_opt_name, NULL, + NULL) == 0) { ; } else if (null_cache_vnodes && (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) {