diff options
author | jeff <jeff@FreeBSD.org> | 2005-03-29 13:09:42 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-03-29 13:09:42 +0000 |
commit | ca1e4c2fe08ddca6d8bb843c635cb05b2ccf61ae (patch) | |
tree | 92eb84a2d2d9af54ef213ce03aa350828627dfe2 /sys/fs/smbfs/smbfs_vnops.c | |
parent | 7d8081dca491f34620fcb86e26b6a1e24275de75 (diff) | |
download | FreeBSD-src-ca1e4c2fe08ddca6d8bb843c635cb05b2ccf61ae.zip FreeBSD-src-ca1e4c2fe08ddca6d8bb843c635cb05b2ccf61ae.tar.gz |
- Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
prevents any callers from doing a modifying op without
LOCKPARENT or WANTPARENT.
Diffstat (limited to 'sys/fs/smbfs/smbfs_vnops.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_vnops.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index 3bdcfdb..b7f08fe 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -1076,7 +1076,7 @@ smbfs_lookup(ap) int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; int nmlen = cnp->cn_namelen; - int wantparent, error, islastcn, isdot; + int error, islastcn, isdot; int killit; SMBVDEBUG("\n"); @@ -1103,7 +1103,6 @@ smbfs_lookup(ap) return EROFS; if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) return error; - wantparent = flags & (LOCKPARENT|WANTPARENT); smp = VFSTOSMBFS(mp); dnp = VTOSMB(dvp); isdot = (nmlen == 1 && name[0] == '.'); @@ -1183,7 +1182,7 @@ smbfs_lookup(ap) /* * Handle RENAME or CREATE case... */ - if ((nameiop == CREATE || nameiop == RENAME) && wantparent && islastcn) { + if ((nameiop == CREATE || nameiop == RENAME) && islastcn) { error = VOP_ACCESS(dvp, VWRITE, cnp->cn_cred, td); if (error) return error; @@ -1213,7 +1212,7 @@ smbfs_lookup(ap) cnp->cn_flags |= SAVENAME; return 0; } - if (nameiop == RENAME && islastcn && wantparent) { + if (nameiop == RENAME && islastcn) { error = VOP_ACCESS(dvp, VWRITE, cnp->cn_cred, td); if (error) return error; |