diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2005-03-29 13:09:42 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2005-03-29 13:09:42 +0000 |
| commit | da1c9cb2b55dfc32fb264d7a056bfeb537304065 (patch) | |
| tree | 92eb84a2d2d9af54ef213ce03aa350828627dfe2 /sys/gnu | |
| parent | fcc9c112cfc44a65eb4d517fc43ba9627584e9bf (diff) | |
Notes
Diffstat (limited to 'sys/gnu')
| -rw-r--r-- | sys/gnu/ext2fs/ext2_lookup.c | 9 | ||||
| -rw-r--r-- | sys/gnu/fs/ext2fs/ext2_lookup.c | 9 |
2 files changed, 2 insertions, 16 deletions
diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c index ec39d02728f6..2b3481a40182 100644 --- a/sys/gnu/ext2fs/ext2_lookup.c +++ b/sys/gnu/ext2fs/ext2_lookup.c @@ -312,7 +312,6 @@ ext2_lookup(ap) struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int wantparent; /* 1 => wantparent flag */ int namlen, error; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; @@ -328,8 +327,6 @@ ext2_lookup(ap) *vpp = NULL; vdp = ap->a_dvp; dp = VTOI(vdp); - wantparent = flags & (LOCKPARENT|WANTPARENT); - /* * We now have a segment name to search for, and a directory to search. */ @@ -572,9 +569,6 @@ found: /* * If deleting, and at end of pathname, return * parameters which can be used to remove file. - * If the wantparent flag isn't set, we return only - * the directory (in ndp->ni_dvp), otherwise we go - * on and lock the inode, being careful with ".". */ if (nameiop == DELETE && (flags & ISLASTCN)) { /* @@ -623,8 +617,7 @@ found: * Must get inode of directory entry to verify it's a * regular file, or empty directory. */ - if (nameiop == RENAME && wantparent && - (flags & ISLASTCN)) { + if (nameiop == RENAME && (flags & ISLASTCN)) { if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_thread)) != 0) return (error); /* diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c index ec39d02728f6..2b3481a40182 100644 --- a/sys/gnu/fs/ext2fs/ext2_lookup.c +++ b/sys/gnu/fs/ext2fs/ext2_lookup.c @@ -312,7 +312,6 @@ ext2_lookup(ap) struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int wantparent; /* 1 => wantparent flag */ int namlen, error; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; @@ -328,8 +327,6 @@ ext2_lookup(ap) *vpp = NULL; vdp = ap->a_dvp; dp = VTOI(vdp); - wantparent = flags & (LOCKPARENT|WANTPARENT); - /* * We now have a segment name to search for, and a directory to search. */ @@ -572,9 +569,6 @@ found: /* * If deleting, and at end of pathname, return * parameters which can be used to remove file. - * If the wantparent flag isn't set, we return only - * the directory (in ndp->ni_dvp), otherwise we go - * on and lock the inode, being careful with ".". */ if (nameiop == DELETE && (flags & ISLASTCN)) { /* @@ -623,8 +617,7 @@ found: * Must get inode of directory entry to verify it's a * regular file, or empty directory. */ - if (nameiop == RENAME && wantparent && - (flags & ISLASTCN)) { + if (nameiop == RENAME && (flags & ISLASTCN)) { if ((error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_thread)) != 0) return (error); /* |
