--- sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h 30 Oct 2008 15:36:35 -0000 1.2 +++ sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h 13 May 2009 23:25:13 -0000 @@ -1,9 +1,17 @@ --- fuse_module/fuse.h.orig 2008-02-05 00:25:57.000000000 -0500 -+++ fuse_module/fuse.h 2008-10-29 19:18:43.000000000 -0400 -@@ -25,6 +25,14 @@ ++++ fuse_module/fuse.h 2009-05-13 18:40:19.000000000 -0400 +@@ -25,6 +25,22 @@ #endif #endif ++#ifndef VFSOPS_TAKES_THREAD ++#if __FreeBSD_version >= 800087 ++#define VFSOPS_TAKES_THREAD 0 ++#else ++#define VFSOPS_TAKES_THREAD 1 ++#endif ++#endif ++ +#ifndef VOP_ACCESS_TAKES_ACCMODE_T +#if __FreeBSD_version >= 800052 +#define VOP_ACCESS_TAKES_ACCMODE_T 1 @@ -15,7 +23,7 @@ #ifndef VOP_OPEN_TAKES_FP #if __FreeBSD_version >= 700044 #define VOP_OPEN_TAKES_FP 1 -@@ -49,6 +57,14 @@ +@@ -49,6 +65,14 @@ #endif #endif --- sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c 26 Sep 2008 18:26:35 -0000 1.2 +++ sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c 13 May 2009 23:25:13 -0000 @@ -1,5 +1,5 @@ --- fuse_module/fuse_vfsops.c.orig 2008-02-05 00:25:57.000000000 -0500 -+++ fuse_module/fuse_vfsops.c 2008-09-26 12:53:33.000000000 -0400 ++++ fuse_module/fuse_vfsops.c 2009-05-13 18:54:01.000000000 -0400 @@ -18,6 +18,7 @@ #include #include @@ -8,7 +8,65 @@ #include "fuse.h" #include "fuse_session.h" -@@ -667,7 +668,11 @@ +@@ -213,8 +214,14 @@ + * Mount system call + */ + static int ++#if VFSOPS_TAKES_THREAD + fuse_mount(struct mount *mp, struct thread *td) + { ++#else ++fuse_mount(struct mount *mp) ++{ ++ struct thread *td = curthread; ++#endif + int err = 0; + size_t len; + char *fspec, *subtype = NULL; +@@ -529,8 +536,14 @@ + * Unmount system call + */ + static int ++#if VFSOPS_TAKES_THREAD + fuse_unmount(struct mount *mp, int mntflags, struct thread *td) + { ++#else ++fuse_unmount(struct mount *mp, int mntflags) ++{ ++ struct thread *td = curthread; ++#endif + int flags = 0, err = 0; + struct fuse_data *data; + struct fuse_secondary_data *fsdat = NULL; +@@ -633,8 +646,14 @@ + + /* stolen from portalfs */ + static int ++#if VFSOPS_TAKES_THREAD + fuse_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td) + { ++#else ++fuse_root(struct mount *mp, int flags, struct vnode **vpp) ++{ ++ struct thread *td = curthread; ++#endif + /* + * Return locked reference to root. + */ +@@ -650,7 +669,11 @@ + data = fsdat->master; + sx_slock(&data->mhierlock); + if (data->mpri == FM_PRIMARY) +- err = fuse_root(data->mp, flags, vpp, td); ++ err = fuse_root(data->mp, flags, vpp ++#if VFSOPS_TAKES_THREAD ++ , td ++#endif ++ ); + else + err = ENXIO; + sx_sunlock(&data->mhierlock); +@@ -667,7 +690,11 @@ if (vp->v_type == VNON) { struct vattr va; @@ -21,3 +79,44 @@ } *vpp = vp; #if _DEBUG2G +@@ -678,8 +705,14 @@ + } + + static int ++#if VFSOPS_TAKES_THREAD + fuse_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) + { ++#else ++fuse_statfs(struct mount *mp, struct statfs *sbp) ++{ ++ struct thread *td = curthread; ++#endif + struct fuse_dispatcher fdi; + struct fuse_statfs_out *fsfo; + struct fuse_data *data; +@@ -696,7 +729,11 @@ + + sx_slock(&data->mhierlock); + if (data->mpri == FM_PRIMARY) +- err = fuse_statfs(data->mp, sbp, td); ++ err = fuse_statfs(data->mp, sbp ++#if VFSOPS_TAKES_THREAD ++ , td ++#endif ++ ); + else + err = ENXIO; + sx_sunlock(&data->mhierlock); +@@ -794,7 +831,11 @@ + if (nodeid == FUSE_ROOT_ID) { + if (parentid != FUSE_NULL_ID) + return (ENOENT); +- err = VFS_ROOT(mp, myflags, vpp, td); ++ err = VFS_ROOT(mp, myflags, vpp ++#if VFSOPS_TAKES_THREAD ++ , td ++#endif ++ ); + if (err) + return (err); + KASSERT(*vpp, ("we neither err'd nor found the root node"));