Remove cn_consume from 'struct componentname'. It was never set to anything
other than 0. Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5611
This commit is contained in:
parent
213ed83855
commit
f69db55151
@ -530,7 +530,6 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp,
|
||||
cn->cn_cred = cnp->cn_cred;
|
||||
|
||||
cn->cn_nameptr = cn->cn_pnbuf;
|
||||
cn->cn_consume = cnp->cn_consume;
|
||||
|
||||
if (nameiop == DELETE)
|
||||
cn->cn_flags |= (cnp->cn_flags & (DOWHITEOUT | SAVESTART));
|
||||
@ -918,7 +917,6 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp,
|
||||
cn.cn_thread = td;
|
||||
cn.cn_cred = cred;
|
||||
cn.cn_nameptr = cn.cn_pnbuf;
|
||||
cn.cn_consume = 0;
|
||||
|
||||
vref(udvp);
|
||||
if ((error = relookup(udvp, &vp, &cn)) != 0)
|
||||
@ -1184,7 +1182,6 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td)
|
||||
cn.cn_lkflags = LK_EXCLUSIVE;
|
||||
cn.cn_thread = td;
|
||||
cn.cn_cred = cred;
|
||||
cn.cn_consume = 0;
|
||||
|
||||
/*
|
||||
* check entry in lower.
|
||||
|
@ -538,7 +538,6 @@ dirloop:
|
||||
* the name set the SAVENAME flag. When done, they assume
|
||||
* responsibility for freeing the pathname buffer.
|
||||
*/
|
||||
cnp->cn_consume = 0;
|
||||
for (cp = cnp->cn_nameptr; *cp != 0 && *cp != '/'; cp++)
|
||||
continue;
|
||||
cnp->cn_namelen = cp - cnp->cn_nameptr;
|
||||
@ -791,17 +790,6 @@ good:
|
||||
#ifdef NAMEI_DIAGNOSTIC
|
||||
printf("found\n");
|
||||
#endif
|
||||
/*
|
||||
* Take into account any additional components consumed by
|
||||
* the underlying filesystem.
|
||||
*/
|
||||
if (cnp->cn_consume > 0) {
|
||||
cnp->cn_nameptr += cnp->cn_consume;
|
||||
ndp->ni_next += cnp->cn_consume;
|
||||
ndp->ni_pathlen -= cnp->cn_consume;
|
||||
cnp->cn_consume = 0;
|
||||
}
|
||||
|
||||
dp = ndp->ni_vp;
|
||||
|
||||
/*
|
||||
|
@ -53,7 +53,6 @@ struct componentname {
|
||||
char *cn_pnbuf; /* pathname buffer */
|
||||
char *cn_nameptr; /* pointer to looked up name */
|
||||
long cn_namelen; /* length of looked up component */
|
||||
long cn_consume; /* chars to consume in lookup() */
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user