Deleted Added
full compact
smbfs_node.c (176519) smbfs_node.c (176744)
1/*-
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*-
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_node.c 176519 2008-02-24 16:38:58Z attilio $
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_node.c 176744 2008-03-02 18:56:13Z rwatson $
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/lock.h>
38#include <sys/malloc.h>
39#include <sys/mount.h>
40#include <sys/proc.h>
41#include <sys/queue.h>
42#include <sys/stat.h>
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/lock.h>
38#include <sys/malloc.h>
39#include <sys/mount.h>
40#include <sys/proc.h>
41#include <sys/queue.h>
42#include <sys/stat.h>
43#include <sys/sx.h>
43#include <sys/sysctl.h>
44#include <sys/time.h>
45#include <sys/vnode.h>
46
47#include <netsmb/smb.h>
48#include <netsmb/smb_conn.h>
49#include <netsmb/smb_subr.h>
50
51#include <vm/vm.h>
52#include <vm/vm_extern.h>
53/*#include <vm/vm_page.h>
54#include <vm/vm_object.h>*/
55
56#include <fs/smbfs/smbfs.h>
57#include <fs/smbfs/smbfs_node.h>
58#include <fs/smbfs/smbfs_subr.h>
59
60#define SMBFS_NOHASH(smp, hval) (&(smp)->sm_hash[(hval) & (smp)->sm_hashlen])
44#include <sys/sysctl.h>
45#include <sys/time.h>
46#include <sys/vnode.h>
47
48#include <netsmb/smb.h>
49#include <netsmb/smb_conn.h>
50#include <netsmb/smb_subr.h>
51
52#include <vm/vm.h>
53#include <vm/vm_extern.h>
54/*#include <vm/vm_page.h>
55#include <vm/vm_object.h>*/
56
57#include <fs/smbfs/smbfs.h>
58#include <fs/smbfs/smbfs_node.h>
59#include <fs/smbfs/smbfs_subr.h>
60
61#define SMBFS_NOHASH(smp, hval) (&(smp)->sm_hash[(hval) & (smp)->sm_hashlen])
61#define smbfs_hash_lock(smp, td) \
62 lockmgr(&smp->sm_hashlock, LK_EXCLUSIVE, NULL)
63#define smbfs_hash_unlock(smp, td) \
64 lockmgr(&smp->sm_hashlock, LK_RELEASE, NULL)
62#define smbfs_hash_lock(smp, td) sx_xlock(&smp->sm_hashlock)
63#define smbfs_hash_unlock(smp, td) sx_xunlock(&smp->sm_hashlock)
65
64
66
67extern struct vop_vector smbfs_vnodeops; /* XXX -> .h file */
68
69MALLOC_DEFINE(M_SMBNODE, "smbufs_node", "SMBFS vnode private part");
70static MALLOC_DEFINE(M_SMBNODENAME, "smbufs_nname", "SMBFS node name");
71
72int smbfs_hashprint(struct mount *mp);
73
74#if 0

--- 374 unchanged lines hidden ---
65extern struct vop_vector smbfs_vnodeops; /* XXX -> .h file */
66
67MALLOC_DEFINE(M_SMBNODE, "smbufs_node", "SMBFS vnode private part");
68static MALLOC_DEFINE(M_SMBNODENAME, "smbufs_nname", "SMBFS node name");
69
70int smbfs_hashprint(struct mount *mp);
71
72#if 0

--- 374 unchanged lines hidden ---