- Remove reset of vpp pointer in some places as long as it's not really

useful and has the side effect of obfuscating the code a bit.
- Remove spurious references to simple_lock.

Reported by:	attilio [1]
Sponsored by:	iXsystems inc.
This commit is contained in:
Davide Italiano 2012-11-22 09:13:45 +00:00
parent 80704a47af
commit 2c4415419f
3 changed files with 0 additions and 5 deletions

View File

@ -79,7 +79,6 @@ struct smbmount {
uint64_t sm_flags;
long sm_nextino;
struct smb_share * sm_share;
/* struct simplelock sm_npslock;*/
struct smbnode * sm_npstack[SMBFS_MAXPATHCOMP];
int sm_caseopt;
int sm_didrele;

View File

@ -114,7 +114,6 @@ smbfs_node_alloc(struct mount *mp, struct vnode *dvp, const char *dirnm,
sc.n_parent = dvp;
sc.n_nmlen = nmlen;
sc.n_name = name;
*vpp = NULL;
if (smp->sm_root != NULL && dvp == NULL) {
SMBERROR("do not allocate root vnode twice!\n");
return EINVAL;
@ -136,7 +135,6 @@ smbfs_node_alloc(struct mount *mp, struct vnode *dvp, const char *dirnm,
vprint("smbfs_node_alloc: dead parent vnode", dvp);
return EINVAL;
}
*vpp = NULL;
error = vfs_hash_get(mp, smbfs_hash(name, nmlen), LK_EXCLUSIVE, td,
vpp, smbfs_vnode_cmp, &sc);
if (error)
@ -233,7 +231,6 @@ smbfs_nget(struct mount *mp, struct vnode *dvp, const char *name, int nmlen,
struct vnode *vp;
int error, sep;
*vpp = NULL;
dnp = (dvp) ? VTOSMB(dvp) : NULL;
sep = 0;
if (dnp != NULL) {

View File

@ -207,7 +207,6 @@ smbfs_mount(struct mount *mp)
vfs_flagopt(mp->mnt_optnew,
"nolong", &smp->sm_flags, SMBFS_MOUNT_NO_LONG);
/* simple_lock_init(&smp->sm_npslock);*/
pc = mp->mnt_stat.f_mntfromname;
pe = pc + sizeof(mp->mnt_stat.f_mntfromname);
bzero(pc, MNAMELEN);