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:
Edward Tomasz Napierala 2016-03-12 08:50:38 +00:00
parent 213ed83855
commit f69db55151
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296716
3 changed files with 0 additions and 16 deletions

View File

@ -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.

View File

@ -538,7 +538,6 @@ lookup(struct nameidata *ndp)
* 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 @@ lookup(struct nameidata *ndp)
#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;
/*

View File

@ -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() */
};
/*