Thu Jun 9 02:59:22 2011 UTC ()
Remove few references to simple_lock.


(rmind)
diff -r1.65 -r1.66 src/sys/fs/filecorefs/filecore_vfsops.c
diff -r1.14 -r1.15 src/sys/fs/smbfs/smbfs_subr.c

cvs diff -r1.65 -r1.66 src/sys/fs/filecorefs/filecore_vfsops.c (expand / switch to unified diff)

--- src/sys/fs/filecorefs/filecore_vfsops.c 2011/05/23 22:00:31 1.65
+++ src/sys/fs/filecorefs/filecore_vfsops.c 2011/06/09 02:59:22 1.66
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: filecore_vfsops.c,v 1.65 2011/05/23 22:00:31 rmind Exp $ */ 1/* $NetBSD: filecore_vfsops.c,v 1.66 2011/06/09 02:59:22 rmind Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1994 The Regents of the University of California. 4 * Copyright (c) 1994 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -56,27 +56,27 @@ @@ -56,27 +56,27 @@
56 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 56 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
57 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 57 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
58 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 58 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
59 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 59 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
60 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 60 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63 * SUCH DAMAGE. 63 * SUCH DAMAGE.
64 * 64 *
65 * filecore_vfsops.c 1.1 1998/6/26 65 * filecore_vfsops.c 1.1 1998/6/26
66 */ 66 */
67 67
68#include <sys/cdefs.h> 68#include <sys/cdefs.h>
69__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.65 2011/05/23 22:00:31 rmind Exp $"); 69__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.66 2011/06/09 02:59:22 rmind Exp $");
70 70
71#if defined(_KERNEL_OPT) 71#if defined(_KERNEL_OPT)
72#include "opt_compat_netbsd.h" 72#include "opt_compat_netbsd.h"
73#endif 73#endif
74 74
75#include <sys/param.h> 75#include <sys/param.h>
76#include <sys/systm.h> 76#include <sys/systm.h>
77#include <sys/namei.h> 77#include <sys/namei.h>
78#include <sys/proc.h> 78#include <sys/proc.h>
79#include <sys/vnode.h> 79#include <sys/vnode.h>
80#include <miscfs/genfs/genfs.h> 80#include <miscfs/genfs/genfs.h>
81#include <miscfs/specfs/specdev.h> 81#include <miscfs/specfs/specdev.h>
82#include <sys/mount.h> 82#include <sys/mount.h>
@@ -206,29 +206,29 @@ filecore_mountroot(void) @@ -206,29 +206,29 @@ filecore_mountroot(void)
206 */ 206 */
207 if (bdevvp(rootdev, &rootvp)) 207 if (bdevvp(rootdev, &rootvp))
208 panic("filecore_mountroot: can't setup rootvp"); 208 panic("filecore_mountroot: can't setup rootvp");
209 209
210 if ((error = vfs_rootmountalloc(MOUNT_FILECORE, "root_device", &mp)) != 0) 210 if ((error = vfs_rootmountalloc(MOUNT_FILECORE, "root_device", &mp)) != 0)
211 return (error); 211 return (error);
212 212
213 args.flags = FILECOREMNT_ROOT; 213 args.flags = FILECOREMNT_ROOT;
214 if ((error = filecore_mountfs(rootvp, mp, p, &args)) != 0) { 214 if ((error = filecore_mountfs(rootvp, mp, p, &args)) != 0) {
215 vfs_unbusy(mp, false, NULL); 215 vfs_unbusy(mp, false, NULL);
216 vfs_destroy(mp); 216 vfs_destroy(mp);
217 return (error); 217 return (error);
218 } 218 }
219 simple_lock(&mountlist_slock); 219 mutex_enter(&mountlist_lock);
220 CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list); 220 CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list);
221 simple_unlock(&mountlist_slock); 221 mutex_exit(&mountlist_lock);
222 (void)filecore_statvfs(mp, &mp->mnt_stat, p); 222 (void)filecore_statvfs(mp, &mp->mnt_stat, p);
223 vfs_unbusy(mp, false, NULL); 223 vfs_unbusy(mp, false, NULL);
224 return (0); 224 return (0);
225} 225}
226#endif 226#endif
227 227
228/* 228/*
229 * VFS Operations. 229 * VFS Operations.
230 * 230 *
231 * mount system call 231 * mount system call
232 */ 232 */
233int 233int
234filecore_mount(struct mount *mp, const char *path, void *data, size_t *data_len) 234filecore_mount(struct mount *mp, const char *path, void *data, size_t *data_len)

cvs diff -r1.14 -r1.15 src/sys/fs/smbfs/Attic/smbfs_subr.c (expand / switch to unified diff)

--- src/sys/fs/smbfs/Attic/smbfs_subr.c 2007/06/30 09:37:57 1.14
+++ src/sys/fs/smbfs/Attic/smbfs_subr.c 2011/06/09 02:59:22 1.15
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: smbfs_subr.c,v 1.14 2007/06/30 09:37:57 pooka Exp $ */ 1/* $NetBSD: smbfs_subr.c,v 1.15 2011/06/09 02:59:22 rmind Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000-2001, Boris Popov 4 * Copyright (c) 2000-2001, Boris Popov
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 * 33 *
34 * FreeBSD: src/sys/fs/smbfs/smbfs_subr.c,v 1.1 2001/04/10 07:59:05 bp Exp 34 * FreeBSD: src/sys/fs/smbfs/smbfs_subr.c,v 1.1 2001/04/10 07:59:05 bp Exp
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: smbfs_subr.c,v 1.14 2007/06/30 09:37:57 pooka Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: smbfs_subr.c,v 1.15 2011/06/09 02:59:22 rmind Exp $");
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/kernel.h> 42#include <sys/kernel.h>
43#include <sys/malloc.h> 43#include <sys/malloc.h>
44#include <sys/mount.h> 44#include <sys/mount.h>
45#include <sys/time.h> 45#include <sys/time.h>
46#include <sys/vnode.h> 46#include <sys/vnode.h>
47#include <sys/sysctl.h> 47#include <sys/sysctl.h>
48#include <netsmb/iconv.h> 48#include <netsmb/iconv.h>
49 49
50#include <netsmb/smb.h> 50#include <netsmb/smb.h>
51#include <netsmb/smb_conn.h> 51#include <netsmb/smb_conn.h>
@@ -258,46 +258,46 @@ smb_dos2unixtime(u_int dd, u_int dt, u_i @@ -258,46 +258,46 @@ smb_dos2unixtime(u_int dd, u_int dt, u_i
258 } 258 }
259 smb_time_server2local(seconds + lastseconds, tzoff, tsp); 259 smb_time_server2local(seconds + lastseconds, tzoff, tsp);
260 tsp->tv_nsec = (dh % 100) * 10000000; 260 tsp->tv_nsec = (dh % 100) * 10000000;
261} 261}
262 262
263static int 263static int
264smb_fphelp(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *np, 264smb_fphelp(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *np,
265 int caseopt) 265 int caseopt)
266{ 266{
267 struct smbmount *smp= np->n_mount; 267 struct smbmount *smp= np->n_mount;
268 struct smbnode **npp = smp->sm_npstack; 268 struct smbnode **npp = smp->sm_npstack;
269 int i, error = 0; 269 int i, error = 0;
270 270
271/* simple_lock(&smp->sm_npslock);*/ 271/* mutex_enter(&smp->sm_npslock);*/
272 i = 0; 272 i = 0;
273 while (np->n_parent) { 273 while (np->n_parent) {
274 if (i++ == SMBFS_MAXPATHCOMP) { 274 if (i++ == SMBFS_MAXPATHCOMP) {
275/* simple_unlock(&smp->sm_npslock);*/ 275/* mutex_exit(&smp->sm_npslock);*/
276 return ENAMETOOLONG; 276 return ENAMETOOLONG;
277 } 277 }
278 *npp++ = np; 278 *npp++ = np;
279 np = VTOSMB(np->n_parent); 279 np = VTOSMB(np->n_parent);
280 } 280 }
281 while (i--) { 281 while (i--) {
282 np = *--npp; 282 np = *--npp;
283 error = mb_put_uint8(mbp, '\\'); 283 error = mb_put_uint8(mbp, '\\');
284 if (error) 284 if (error)
285 break; 285 break;
286 error = smb_put_dmem(mbp, vcp, np->n_name, np->n_nmlen, caseopt); 286 error = smb_put_dmem(mbp, vcp, np->n_name, np->n_nmlen, caseopt);
287 if (error) 287 if (error)
288 break; 288 break;
289 } 289 }
290/* simple_unlock(&smp->sm_npslock);*/ 290/* mutex_exit(&smp->sm_npslock);*/
291 return error; 291 return error;
292} 292}
293 293
294int 294int
295smbfs_fullpath(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *dnp, 295smbfs_fullpath(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *dnp,
296 const char *name, int nmlen) 296 const char *name, int nmlen)
297{ 297{
298 int caseopt = SMB_CS_NONE; 298 int caseopt = SMB_CS_NONE;
299 int error; 299 int error;
300 300
301 if (SMB_DIALECT(vcp) < SMB_DIALECT_LANMAN1_0) 301 if (SMB_DIALECT(vcp) < SMB_DIALECT_LANMAN1_0)
302 caseopt |= SMB_CS_UPPER; 302 caseopt |= SMB_CS_UPPER;
303 if (dnp != NULL) { 303 if (dnp != NULL) {