Deleted Added
full compact
null_vfsops.c (132023) null_vfsops.c (132902)
1/*
2 * Copyright (c) 1992, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

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 * @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
33 *
34 * @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
1/*
2 * Copyright (c) 1992, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

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 * @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
33 *
34 * @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
35 * $FreeBSD: head/sys/fs/nullfs/null_vfsops.c 132023 2004-07-12 08:14:09Z alfred $
35 * $FreeBSD: head/sys/fs/nullfs/null_vfsops.c 132902 2004-07-30 22:08:52Z phk $
36 */
37
38/*
39 * Null Layer
40 * (See null_vnops.c for a description of what this does.)
41 */
42
43#include <sys/param.h>

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

52#include <sys/vnode.h>
53
54#include <fs/nullfs/null.h>
55
56static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure");
57
58static vfs_fhtovp_t nullfs_fhtovp;
59static vfs_checkexp_t nullfs_checkexp;
36 */
37
38/*
39 * Null Layer
40 * (See null_vnops.c for a description of what this does.)
41 */
42
43#include <sys/param.h>

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

52#include <sys/vnode.h>
53
54#include <fs/nullfs/null.h>
55
56static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure");
57
58static vfs_fhtovp_t nullfs_fhtovp;
59static vfs_checkexp_t nullfs_checkexp;
60static vfs_nmount_t nullfs_mount;
60static vfs_mount_t nullfs_mount;
61static vfs_quotactl_t nullfs_quotactl;
62static vfs_root_t nullfs_root;
63static vfs_start_t nullfs_start;
64static vfs_sync_t nullfs_sync;
65static vfs_statfs_t nullfs_statfs;
66static vfs_unmount_t nullfs_unmount;
67static vfs_vget_t nullfs_vget;
68static vfs_vptofh_t nullfs_vptofh;
69static vfs_extattrctl_t nullfs_extattrctl;
70
71/*
72 * Mount null layer
73 */
74static int
61static vfs_quotactl_t nullfs_quotactl;
62static vfs_root_t nullfs_root;
63static vfs_start_t nullfs_start;
64static vfs_sync_t nullfs_sync;
65static vfs_statfs_t nullfs_statfs;
66static vfs_unmount_t nullfs_unmount;
67static vfs_vget_t nullfs_vget;
68static vfs_vptofh_t nullfs_vptofh;
69static vfs_extattrctl_t nullfs_extattrctl;
70
71/*
72 * Mount null layer
73 */
74static int
75nullfs_mount(mp, ndp, td)
76 struct mount *mp;
77 struct nameidata *ndp;
78 struct thread *td;
75nullfs_mount(struct mount *mp, struct thread *td)
79{
80 int error = 0;
81 struct vnode *lowerrootvp, *vp;
82 struct vnode *nullm_rootvp;
83 struct null_mount *xmp;
84 char *target;
85 size_t size;
86 int isvnunlocked = 0, len;
76{
77 int error = 0;
78 struct vnode *lowerrootvp, *vp;
79 struct vnode *nullm_rootvp;
80 struct null_mount *xmp;
81 char *target;
82 size_t size;
83 int isvnunlocked = 0, len;
84 struct nameidata nd, *ndp = &nd;
87
88 NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp);
89
90 /*
91 * Update is a no-op
92 */
93 if (mp->mnt_flag & MNT_UPDATE) {
94 return (EOPNOTSUPP);

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

398}
399
400
401static struct vfsops null_vfsops = {
402 .vfs_checkexp = nullfs_checkexp,
403 .vfs_extattrctl = nullfs_extattrctl,
404 .vfs_fhtovp = nullfs_fhtovp,
405 .vfs_init = nullfs_init,
85
86 NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp);
87
88 /*
89 * Update is a no-op
90 */
91 if (mp->mnt_flag & MNT_UPDATE) {
92 return (EOPNOTSUPP);

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

396}
397
398
399static struct vfsops null_vfsops = {
400 .vfs_checkexp = nullfs_checkexp,
401 .vfs_extattrctl = nullfs_extattrctl,
402 .vfs_fhtovp = nullfs_fhtovp,
403 .vfs_init = nullfs_init,
406 .vfs_nmount = nullfs_mount,
404 .vfs_mount = nullfs_mount,
407 .vfs_quotactl = nullfs_quotactl,
408 .vfs_root = nullfs_root,
409 .vfs_start = nullfs_start,
410 .vfs_statfs = nullfs_statfs,
411 .vfs_sync = nullfs_sync,
412 .vfs_uninit = nullfs_uninit,
413 .vfs_unmount = nullfs_unmount,
414 .vfs_vget = nullfs_vget,
415 .vfs_vptofh = nullfs_vptofh,
416};
417
418VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK);
405 .vfs_quotactl = nullfs_quotactl,
406 .vfs_root = nullfs_root,
407 .vfs_start = nullfs_start,
408 .vfs_statfs = nullfs_statfs,
409 .vfs_sync = nullfs_sync,
410 .vfs_uninit = nullfs_uninit,
411 .vfs_unmount = nullfs_unmount,
412 .vfs_vget = nullfs_vget,
413 .vfs_vptofh = nullfs_vptofh,
414};
415
416VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK);