summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-29 13:04:00 +0000
committerjeff <jeff@FreeBSD.org>2005-03-29 13:04:00 +0000
commit7d8081dca491f34620fcb86e26b6a1e24275de75 (patch)
treeb271bdfa3480cec46ef70c8f226add65242bfa6a /sys/fs
parent141aba2c7b24ff834f46b1db7dc419aed0f550ee (diff)
downloadFreeBSD-src-7d8081dca491f34620fcb86e26b6a1e24275de75.zip
FreeBSD-src-7d8081dca491f34620fcb86e26b6a1e24275de75.tar.gz
- Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
prevents any callers from doing a DELETE or RENAME without locking the parent.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_lookup.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c
index d225703..70ef2b4 100644
--- a/sys/fs/msdosfs/msdosfs_lookup.c
+++ b/sys/fs/msdosfs/msdosfs_lookup.c
@@ -90,7 +90,6 @@ msdosfs_lookup(ap)
struct componentname *cnp = ap->a_cnp;
daddr_t bn;
int error;
- int wantparent;
int slotcount;
int slotoffset = 0;
int frcn;
@@ -122,7 +121,6 @@ msdosfs_lookup(ap)
dp = VTODE(vdp);
pmp = dp->de_pmp;
*vpp = NULL;
- wantparent = flags & (LOCKPARENT | WANTPARENT);
#ifdef MSDOSFS_DEBUG
printf("msdosfs_lookup(): vdp %p, dp %p, Attr %02x\n",
vdp, dp, dp->de_Attributes);
@@ -436,9 +434,6 @@ foundroot:
/*
* 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)) {
/*
@@ -476,8 +471,7 @@ foundroot:
* 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 (blkoff == MSDOSFSROOT_OFS)
return EROFS; /* really? XXX */
OpenPOWER on IntegriCloud