Sun Sep 7 13:13:04 2008 UTC ()
Remove duplicate definition of "smbfs_node_pool".
Fix based on a patch provided by Juan RP in PR kern/39494.


(tron)
diff -r1.16 -r1.17 src/sys/fs/smbfs/smbfs.h
diff -r1.84 -r1.85 src/sys/fs/smbfs/smbfs_vfsops.c

cvs diff -r1.16 -r1.17 src/sys/fs/smbfs/Attic/smbfs.h (expand / switch to unified diff)

--- src/sys/fs/smbfs/Attic/smbfs.h 2008/01/26 14:25:38 1.16
+++ src/sys/fs/smbfs/Attic/smbfs.h 2008/09/07 13:13:04 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: smbfs.h,v 1.16 2008/01/26 14:25:38 ad Exp $ */ 1/* $NetBSD: smbfs.h,v 1.17 2008/09/07 13:13:04 tron 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.
@@ -60,41 +60,45 @@ struct smbfs_args { @@ -60,41 +60,45 @@ struct smbfs_args {
60 gid_t gid; 60 gid_t gid;
61 mode_t file_mode; 61 mode_t file_mode;
62 mode_t dir_mode; 62 mode_t dir_mode;
63 int caseopt; 63 int caseopt;
64}; 64};
65 65
66#ifdef _KERNEL 66#ifdef _KERNEL
67 67
68struct smbnode; 68struct smbnode;
69struct smb_share; 69struct smb_share;
70struct u_cred; 70struct u_cred;
71struct vop_ioctl_args; 71struct vop_ioctl_args;
72struct buf; 72struct buf;
 73struct pool;
73 74
74struct smbmount { 75struct smbmount {
75 struct smbfs_args sm_args; 76 struct smbfs_args sm_args;
76 struct mount * sm_mp; 77 struct mount * sm_mp;
77 struct smbnode * sm_root; 78 struct smbnode * sm_root;
78 kauth_cred_t sm_owner; 79 kauth_cred_t sm_owner;
79 int sm_flags; 80 int sm_flags;
80 long sm_nextino; 81 long sm_nextino;
81 struct smb_share * sm_share; 82 struct smb_share * sm_share;
82 struct smbnode * sm_npstack[SMBFS_MAXPATHCOMP]; 83 struct smbnode * sm_npstack[SMBFS_MAXPATHCOMP];
83 int sm_caseopt; 84 int sm_caseopt;
84 kmutex_t sm_hashlock; 85 kmutex_t sm_hashlock;
85 LIST_HEAD(smbnode_hashhead, smbnode) *sm_hash; 86 LIST_HEAD(smbnode_hashhead, smbnode) *sm_hash;
86 u_long sm_hashlen; 87 u_long sm_hashlen;
87 int sm_didrele; 88 int sm_didrele;
88}; 89};
89 90
90#define VFSTOSMBFS(mp) ((struct smbmount *)((mp)->mnt_data)) 91#define VFSTOSMBFS(mp) ((struct smbmount *)((mp)->mnt_data))
91#define SMBFSTOVFS(smp) ((struct mount *)((smp)->sm_mp)) 92#define SMBFSTOVFS(smp) ((struct mount *)((smp)->sm_mp))
92#define VTOVFS(vp) ((vp)->v_mount) 93#define VTOVFS(vp) ((vp)->v_mount)
93#define VTOSMBFS(vp) (VFSTOSMBFS(VTOVFS(vp))) 94#define VTOSMBFS(vp) (VFSTOSMBFS(VTOVFS(vp)))
94 95
95int smbfs_doio(struct buf *, kauth_cred_t, struct lwp *); 96int smbfs_doio(struct buf *, kauth_cred_t, struct lwp *);
96int smbfs_vinvalbuf(struct vnode *, int, kauth_cred_t, struct lwp *, int); 97int smbfs_vinvalbuf(struct vnode *, int, kauth_cred_t, struct lwp *, int);
97int smbfs_kqfilter(void *); 98int smbfs_kqfilter(void *);
 99
 100extern struct pool smbfs_node_pool;
 101
98#endif /* KERNEL */ 102#endif /* KERNEL */
99 103
100#endif /* _FS_SMBFS_SMBFS_H_ */ 104#endif /* _FS_SMBFS_SMBFS_H_ */

cvs diff -r1.84 -r1.85 src/sys/fs/smbfs/Attic/smbfs_vfsops.c (expand / switch to unified diff)

--- src/sys/fs/smbfs/Attic/smbfs_vfsops.c 2008/06/29 18:45:20 1.84
+++ src/sys/fs/smbfs/Attic/smbfs_vfsops.c 2008/09/07 13:13:04 1.85
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: smbfs_vfsops.c,v 1.84 2008/06/29 18:45:20 rumble Exp $ */ 1/* $NetBSD: smbfs_vfsops.c,v 1.85 2008/09/07 13:13:04 tron 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_vfsops.c,v 1.5 2001/12/13 13:08:34 sheldonh Exp 34 * FreeBSD: src/sys/fs/smbfs/smbfs_vfsops.c,v 1.5 2001/12/13 13:08:34 sheldonh Exp
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops.c,v 1.84 2008/06/29 18:45:20 rumble Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops.c,v 1.85 2008/09/07 13:13:04 tron Exp $");
39 39
40#ifdef _KERNEL_OPT 40#ifdef _KERNEL_OPT
41#include "opt_quota.h" 41#include "opt_quota.h"
42#endif 42#endif
43 43
44#include <sys/param.h> 44#include <sys/param.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46#include <sys/proc.h> 46#include <sys/proc.h>
47#include <sys/buf.h> 47#include <sys/buf.h>
48#include <sys/kernel.h> 48#include <sys/kernel.h>
49#include <sys/dirent.h> 49#include <sys/dirent.h>
50#include <sys/sysctl.h> 50#include <sys/sysctl.h>
51#include <sys/vnode.h> 51#include <sys/vnode.h>
@@ -64,27 +64,26 @@ __KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops @@ -64,27 +64,26 @@ __KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops
64 64
65#include <fs/smbfs/smbfs.h> 65#include <fs/smbfs/smbfs.h>
66#include <fs/smbfs/smbfs_node.h> 66#include <fs/smbfs/smbfs_node.h>
67#include <fs/smbfs/smbfs_subr.h> 67#include <fs/smbfs/smbfs_subr.h>
68 68
69MODULE(MODULE_CLASS_VFS, smbfs, NULL); 69MODULE(MODULE_CLASS_VFS, smbfs, NULL);
70 70
71VFS_PROTOS(smbfs); 71VFS_PROTOS(smbfs);
72 72
73static struct sysctllog *smbfs_sysctl_log; 73static struct sysctllog *smbfs_sysctl_log;
74 74
75static int smbfs_setroot(struct mount *); 75static int smbfs_setroot(struct mount *);
76 76
77struct pool smbfs_node_pool; 
78extern struct vnodeopv_desc smbfs_vnodeop_opv_desc; 77extern struct vnodeopv_desc smbfs_vnodeop_opv_desc;
79 78
80static const struct vnodeopv_desc *smbfs_vnodeopv_descs[] = { 79static const struct vnodeopv_desc *smbfs_vnodeopv_descs[] = {
81 &smbfs_vnodeop_opv_desc, 80 &smbfs_vnodeop_opv_desc,
82 NULL, 81 NULL,
83}; 82};
84 83
85struct vfsops smbfs_vfsops = { 84struct vfsops smbfs_vfsops = {
86 MOUNT_SMBFS, 85 MOUNT_SMBFS,
87 sizeof (struct smbfs_args), 86 sizeof (struct smbfs_args),
88 smbfs_mount, 87 smbfs_mount,
89 smbfs_start, 88 smbfs_start,
90 smbfs_unmount, 89 smbfs_unmount,