From owner-svn-src-all@freebsd.org Sat Mar 12 08:50:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29227ACC01A; Sat, 12 Mar 2016 08:50:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D53077AB; Sat, 12 Mar 2016 08:50:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2C8ocZU077068; Sat, 12 Mar 2016 08:50:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2C8oceZ077064; Sat, 12 Mar 2016 08:50:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201603120850.u2C8oceZ077064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 12 Mar 2016 08:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296716 - in head/sys: fs/unionfs kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 08:50:40 -0000 Author: trasz Date: Sat Mar 12 08:50:38 2016 New Revision: 296716 URL: https://svnweb.freebsd.org/changeset/base/296716 Log: 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 Modified: head/sys/fs/unionfs/union_subr.c head/sys/kern/vfs_lookup.c head/sys/sys/namei.h Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Sat Mar 12 07:54:42 2016 (r296715) +++ head/sys/fs/unionfs/union_subr.c Sat Mar 12 08:50:38 2016 (r296716) @@ -530,7 +530,6 @@ unionfs_relookup(struct vnode *dvp, stru 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 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, st cn.cn_lkflags = LK_EXCLUSIVE; cn.cn_thread = td; cn.cn_cred = cred; - cn.cn_consume = 0; /* * check entry in lower. Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sat Mar 12 07:54:42 2016 (r296715) +++ head/sys/kern/vfs_lookup.c Sat Mar 12 08:50:38 2016 (r296716) @@ -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; /* Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Sat Mar 12 07:54:42 2016 (r296715) +++ head/sys/sys/namei.h Sat Mar 12 08:50:38 2016 (r296716) @@ -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() */ }; /*