vfs_cache.c (a2cb65b8fe975a8f228258e3057b62e068dbf8e2) vfs_cache.c (b4a58fbf640409a1e507d9f7b411c83a3f83a2f3)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1989, 1993, 1995
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Poul-Henning Kamp of the FreeBSD Project.

--- 4205 unchanged lines hidden (view full) ---

4214cache_can_fplookup(struct cache_fpl *fpl)
4215{
4216 struct nameidata *ndp;
4217 struct componentname *cnp;
4218 struct thread *td;
4219
4220 ndp = fpl->ndp;
4221 cnp = fpl->cnp;
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1989, 1993, 1995
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Poul-Henning Kamp of the FreeBSD Project.

--- 4205 unchanged lines hidden (view full) ---

4214cache_can_fplookup(struct cache_fpl *fpl)
4215{
4216 struct nameidata *ndp;
4217 struct componentname *cnp;
4218 struct thread *td;
4219
4220 ndp = fpl->ndp;
4221 cnp = fpl->cnp;
4222 td = cnp->cn_thread;
4222 td = curthread;
4223
4224 if (!atomic_load_char(&cache_fast_lookup_enabled)) {
4225 cache_fpl_aborted_early(fpl);
4226 return (false);
4227 }
4228 if ((cnp->cn_flags & ~CACHE_FPL_SUPPORTED_CN_FLAGS) != 0) {
4229 cache_fpl_aborted_early(fpl);
4230 return (false);

--- 1748 unchanged lines hidden (view full) ---

5979 struct componentname *cnp;
5980 int error;
5981
5982 fpl.status = CACHE_FPL_STATUS_UNSET;
5983 fpl.in_smr = false;
5984 fpl.ndp = ndp;
5985 fpl.cnp = cnp = &ndp->ni_cnd;
5986 MPASS(ndp->ni_lcf == 0);
4223
4224 if (!atomic_load_char(&cache_fast_lookup_enabled)) {
4225 cache_fpl_aborted_early(fpl);
4226 return (false);
4227 }
4228 if ((cnp->cn_flags & ~CACHE_FPL_SUPPORTED_CN_FLAGS) != 0) {
4229 cache_fpl_aborted_early(fpl);
4230 return (false);

--- 1748 unchanged lines hidden (view full) ---

5979 struct componentname *cnp;
5980 int error;
5981
5982 fpl.status = CACHE_FPL_STATUS_UNSET;
5983 fpl.in_smr = false;
5984 fpl.ndp = ndp;
5985 fpl.cnp = cnp = &ndp->ni_cnd;
5986 MPASS(ndp->ni_lcf == 0);
5987 MPASS(curthread == cnp->cn_thread);
5988 KASSERT ((cnp->cn_flags & CACHE_FPL_INTERNAL_CN_FLAGS) == 0,
5989 ("%s: internal flags found in cn_flags %" PRIx64, __func__,
5990 cnp->cn_flags));
5991 if ((cnp->cn_flags & SAVESTART) != 0) {
5992 MPASS(cnp->cn_nameiop != LOOKUP);
5993 }
5994 MPASS(cnp->cn_nameptr == cnp->cn_pnbuf);
5995

--- 67 unchanged lines hidden ---
5987 KASSERT ((cnp->cn_flags & CACHE_FPL_INTERNAL_CN_FLAGS) == 0,
5988 ("%s: internal flags found in cn_flags %" PRIx64, __func__,
5989 cnp->cn_flags));
5990 if ((cnp->cn_flags & SAVESTART) != 0) {
5991 MPASS(cnp->cn_nameiop != LOOKUP);
5992 }
5993 MPASS(cnp->cn_nameptr == cnp->cn_pnbuf);
5994

--- 67 unchanged lines hidden ---