Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106978045
D27193.id79469.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27193.id79469.diff
View Options
Index: sys/kern/vfs_lookup.c
===================================================================
--- sys/kern/vfs_lookup.c
+++ sys/kern/vfs_lookup.c
@@ -1305,7 +1305,6 @@
relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
{
struct vnode *dp = NULL; /* the directory we are searching */
- int wantparent; /* 1 => wantparent or lockparent flag */
int rdonly; /* lookup read-only flag bit */
int error = 0;
@@ -1314,8 +1313,8 @@
/*
* Setup: break out flag bits into variables.
*/
- wantparent = cnp->cn_flags & (LOCKPARENT|WANTPARENT);
- KASSERT(wantparent, ("relookup: parent not wanted."));
+ KASSERT((cnp->cn_flags & (LOCKPARENT|WANTPARENT)) != 0,
+ ("relookup: parent not wanted"));
rdonly = cnp->cn_flags & RDONLY;
cnp->cn_flags &= ~ISSYMLINK;
dp = dvp;
@@ -1406,13 +1405,8 @@
/*
* Set the parent lock/ref state to the requested state.
*/
- if ((cnp->cn_flags & LOCKPARENT) == 0 && dvp != dp) {
- if (wantparent)
- VOP_UNLOCK(dvp);
- else
- vput(dvp);
- } else if (!wantparent)
- vrele(dvp);
+ if ((cnp->cn_flags & LOCKPARENT) == 0 && dvp != dp)
+ VOP_UNLOCK(dvp);
/*
* Check for symbolic link
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 9, 10:12 AM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15731600
Default Alt Text
D27193.id79469.diff (1 KB)
Attached To
Mode
D27193: Remove 'wantparent' variable, unused since r145004.
Attached
Detach File
Event Timeline
Log In to Comment