X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/bdb99a3d02fb2fe162952f789579f72663dabfa5..ca466baeb91097acf0817cd63a0c33886ca69d31:/sys/vfs/fdesc/fdesc_vfsops.c diff --git a/sys/vfs/fdesc/fdesc_vfsops.c b/sys/vfs/fdesc/fdesc_vfsops.c index ab0957db81..f39d25d746 100644 --- a/sys/vfs/fdesc/fdesc_vfsops.c +++ b/sys/vfs/fdesc/fdesc_vfsops.c @@ -36,7 +36,7 @@ * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * * $FreeBSD: src/sys/miscfs/fdesc/fdesc_vfsops.c,v 1.22.2.3 2002/08/23 17:42:39 njl Exp $ - * $DragonFly: src/sys/vfs/fdesc/fdesc_vfsops.c,v 1.13 2005/02/11 22:07:32 joerg Exp $ + * $DragonFly: src/sys/vfs/fdesc/fdesc_vfsops.c,v 1.18 2006/05/05 21:15:09 dillon Exp $ */ /* @@ -87,7 +87,8 @@ fdesc_mount(struct mount *mp, char *path, caddr_t data, struct thread *td) if (mp->mnt_flag & MNT_UPDATE) return (EOPNOTSUPP); - vfs_add_vnodeops(mp, &mp->mnt_vn_norm_ops, fdesc_vnodeop_entries); + vfs_add_vnodeops(mp, &mp->mnt_vn_norm_ops, + fdesc_vnodeop_entries, 0); error = fdesc_allocvp(Froot, FD_ROOT, mp, &rvp, td); if (error) @@ -105,7 +106,7 @@ fdesc_mount(struct mount *mp, char *path, caddr_t data, struct thread *td) bzero(mp->mnt_stat.f_mntfromname, MNAMELEN); bcopy("fdesc", mp->mnt_stat.f_mntfromname, sizeof("fdesc")); - (void)fdesc_statfs(mp, &mp->mnt_stat, td); + fdesc_statfs(mp, &mp->mnt_stat, td); return (0); } @@ -141,7 +142,6 @@ fdesc_unmount(struct mount *mp, int mntflags, struct thread *td) int fdesc_root(struct mount *mp, struct vnode **vpp) { - struct thread *td = curthread; /* XXX */ struct vnode *vp; /* @@ -149,7 +149,7 @@ fdesc_root(struct mount *mp, struct vnode **vpp) */ vp = VFSTOFDESC(mp)->f_root; vref(vp); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); *vpp = vp; return (0); } @@ -177,7 +177,7 @@ fdesc_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) last = min(fdp->fd_nfiles, lim); freefd = 0; for (i = fdp->fd_freefile; i < last; i++) - if (fdp->fd_ofiles[i] == NULL) + if (fdp->fd_files[i].fp == NULL) freefd++; /* @@ -204,20 +204,13 @@ fdesc_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) } static struct vfsops fdesc_vfsops = { - fdesc_mount, - vfs_stdstart, - fdesc_unmount, - fdesc_root, - vfs_stdquotactl, - fdesc_statfs, - vfs_stdsync, - vfs_stdvget, - vfs_stdfhtovp, - vfs_stdcheckexp, - vfs_stdvptofh, - fdesc_init, - vfs_stduninit, - vfs_stdextattrctl, + .vfs_mount = fdesc_mount, + .vfs_unmount = fdesc_unmount, + .vfs_root = fdesc_root, + .vfs_statfs = fdesc_statfs, + .vfs_sync = vfs_stdsync, + .vfs_init = fdesc_init, + .vfs_uninit = fdesc_uninit }; VFS_SET(fdesc_vfsops, fdesc, VFCF_SYNTHETIC);