cache: remove NOCACHE handling from cache_fplookup_noentry
It was copy-pasted from locked lookup. As LOOKUP operation cannot have the flag set it was always ending up setting MAKEENTRY.
This commit is contained in:
parent
513c7a6e0c
commit
611470a515
@ -4830,7 +4830,6 @@ cache_fplookup_noentry(struct cache_fpl *fpl)
|
||||
struct vnode *dvp, *tvp;
|
||||
seqc_t dvp_seqc;
|
||||
int error;
|
||||
bool docache;
|
||||
|
||||
ndp = fpl->ndp;
|
||||
cnp = fpl->cnp;
|
||||
@ -4839,6 +4838,8 @@ cache_fplookup_noentry(struct cache_fpl *fpl)
|
||||
|
||||
MPASS((cnp->cn_flags & MAKEENTRY) == 0);
|
||||
MPASS((cnp->cn_flags & ISDOTDOT) == 0);
|
||||
if (cnp->cn_nameiop == LOOKUP)
|
||||
MPASS((cnp->cn_flags & NOCACHE) == 0);
|
||||
MPASS(!cache_fpl_isdotdot(cnp));
|
||||
|
||||
/*
|
||||
@ -4915,10 +4916,7 @@ cache_fplookup_noentry(struct cache_fpl *fpl)
|
||||
/*
|
||||
* TODO: provide variants which don't require locking either vnode.
|
||||
*/
|
||||
cnp->cn_flags |= ISLASTCN;
|
||||
docache = (cnp->cn_flags & NOCACHE) ^ NOCACHE;
|
||||
if (docache)
|
||||
cnp->cn_flags |= MAKEENTRY;
|
||||
cnp->cn_flags |= ISLASTCN | MAKEENTRY;
|
||||
cnp->cn_lkflags = LK_SHARED;
|
||||
if ((cnp->cn_flags & LOCKSHARED) == 0) {
|
||||
cnp->cn_lkflags = LK_EXCLUSIVE;
|
||||
|
Loading…
Reference in New Issue
Block a user