Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2012 09:13:45 +0000 (UTC)
From:      Davide Italiano <davide@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r243397 - head/sys/fs/smbfs
Message-ID:  <201211220913.qAM9DjNZ040168@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davide
Date: Thu Nov 22 09:13:45 2012
New Revision: 243397
URL: http://svnweb.freebsd.org/changeset/base/243397

Log:
  - 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.

Modified:
  head/sys/fs/smbfs/smbfs.h
  head/sys/fs/smbfs/smbfs_node.c
  head/sys/fs/smbfs/smbfs_vfsops.c

Modified: head/sys/fs/smbfs/smbfs.h
==============================================================================
--- head/sys/fs/smbfs/smbfs.h	Thu Nov 22 08:58:29 2012	(r243396)
+++ head/sys/fs/smbfs/smbfs.h	Thu Nov 22 09:13:45 2012	(r243397)
@@ -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;

Modified: head/sys/fs/smbfs/smbfs_node.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_node.c	Thu Nov 22 08:58:29 2012	(r243396)
+++ head/sys/fs/smbfs/smbfs_node.c	Thu Nov 22 09:13:45 2012	(r243397)
@@ -114,7 +114,6 @@ smbfs_node_alloc(struct mount *mp, struc
 	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, struc
 		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 vnod
 	struct vnode *vp;
 	int error, sep;
 
-	*vpp = NULL;
 	dnp = (dvp) ? VTOSMB(dvp) : NULL;
 	sep = 0;
 	if (dnp != NULL) {

Modified: head/sys/fs/smbfs/smbfs_vfsops.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_vfsops.c	Thu Nov 22 08:58:29 2012	(r243396)
+++ head/sys/fs/smbfs/smbfs_vfsops.c	Thu Nov 22 09:13:45 2012	(r243397)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211220913.qAM9DjNZ040168>