summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/smbfs/smbfs_io.c22
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c61
2 files changed, 4 insertions, 79 deletions
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
index 62290be..57ffd38 100644
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -49,9 +49,6 @@
#include <sys/vmmeter.h>
#include <vm/vm.h>
-#if __FreeBSD_version < 400000
-#include <vm/vm_prot.h>
-#endif
#include <vm/vm_page.h>
#include <vm/vm_extern.h>
#include <vm/vm_object.h>
@@ -441,11 +438,8 @@ smbfs_getpages(ap)
}
smb_makescred(&scred, td, cred);
-#if __FreeBSD_version >= 400000
bp = getpbuf(&smbfs_pbuf_freecnt);
-#else
- bp = getpbuf();
-#endif
+
npages = btoc(count);
kva = (vm_offset_t) bp->b_data;
pmap_qenter(kva, pages, npages);
@@ -465,11 +459,7 @@ smbfs_getpages(ap)
error = smb_read(smp->sm_share, np->n_fid, &uio, &scred);
pmap_qremove(kva, npages);
-#if __FreeBSD_version >= 400000
relpbuf(bp, &smbfs_pbuf_freecnt);
-#else
- relpbuf(bp);
-#endif
if (error && (uio.uio_resid == count)) {
printf("smbfs_getpages: error %d\n",error);
@@ -580,11 +570,8 @@ smbfs_putpages(ap)
rtvals[i] = VM_PAGER_AGAIN;
}
-#if __FreeBSD_version >= 400000
bp = getpbuf(&smbfs_pbuf_freecnt);
-#else
- bp = getpbuf();
-#endif
+
kva = (vm_offset_t) bp->b_data;
pmap_qenter(kva, pages, npages);
cnt.v_vnodeout++;
@@ -607,11 +594,8 @@ smbfs_putpages(ap)
SMBVDEBUG("paged write done: %d\n", error);
pmap_qremove(kva, npages);
-#if __FreeBSD_version >= 400000
+
relpbuf(bp, &smbfs_pbuf_freecnt);
-#else
- relpbuf(bp);
-#endif
if (!error) {
int nwritten = round_page(count - uio.uio_resid) / PAGE_SIZE;
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index 8a82006..f1324a1 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -88,15 +88,6 @@ static int smbfs_unmount(struct mount *, int, struct thread *);
static int smbfs_init(struct vfsconf *vfsp);
static int smbfs_uninit(struct vfsconf *vfsp);
-#if __FreeBSD_version < 400009
-static int smbfs_vget(struct mount *mp, ino_t ino, int flags,
- struct vnode **vpp);
-static int smbfs_fhtovp(struct mount *, struct fid *,
- struct sockaddr *, struct vnode **, int *,
- struct ucred **);
-static int smbfs_vptofh(struct vnode *, struct fid *);
-#endif
-
static struct vfsops smbfs_vfsops = {
smbfs_mount,
smbfs_start,
@@ -105,24 +96,13 @@ static struct vfsops smbfs_vfsops = {
smbfs_quotactl,
smbfs_statfs,
smbfs_sync,
-#if __FreeBSD_version > 400008
vfs_stdvget,
vfs_stdfhtovp, /* shouldn't happen */
vfs_stdcheckexp,
vfs_stdvptofh, /* shouldn't happen */
-#else
- smbfs_vget,
- smbfs_fhtovp,
- smbfs_vptofh,
-#endif
smbfs_init,
smbfs_uninit,
-#ifndef FB_RELENG3
- vfs_stdextattrctl,
-#else
-#define M_USE_RESERVE M_KERNEL
- &sysctl___vfs_smbfs
-#endif
+ vfs_stdextattrctl
};
@@ -462,42 +442,3 @@ loop:
return (allerror);
}
-#if __FreeBSD_version < 400009
-/*
- * smbfs flat namespace lookup. Unsupported.
- */
-/* ARGSUSED */
-static int smbfs_vget(mp, ino, flags, vpp)
- struct mount *mp;
- ino_t ino;
- int flags;
- struct vnode **vpp;
-{
- return (EOPNOTSUPP);
-}
-
-/* ARGSUSED */
-static int smbfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
- struct mount *mp;
- struct fid *fhp;
- struct sockaddr *nam;
- struct vnode **vpp;
- int *exflagsp;
- struct ucred **credanonp;
-{
- return (EINVAL);
-}
-
-/*
- * Vnode pointer to File handle, should never happen either
- */
-/* ARGSUSED */
-static int
-smbfs_vptofh(vp, fhp)
- struct vnode *vp;
- struct fid *fhp;
-{
- return (EINVAL);
-}
-
-#endif /* __FreeBSD_version < 400009 */
OpenPOWER on IntegriCloud