summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-13 12:25:19 +0000
committerphk <phk@FreeBSD.org>2005-01-13 12:25:19 +0000
commit3760addae23efed2c59b081d8b911fffafea8c14 (patch)
tree7d6746c70417d5e77d9141b543695fea22e9859b /sys/kern
parent1d0efb6bd215298a956b11bba7269f94b30a2b6c (diff)
downloadFreeBSD-src-3760addae23efed2c59b081d8b911fffafea8c14.zip
FreeBSD-src-3760addae23efed2c59b081d8b911fffafea8c14.tar.gz
Ditch vfs_object_create() and make the callers call VOP_CREATEVOBJECT()
directly.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_default.c2
-rw-r--r--sys/kern/vfs_extattr.c4
-rw-r--r--sys/kern/vfs_lookup.c6
-rw-r--r--sys/kern/vfs_subr.c16
-rw-r--r--sys/kern/vfs_syscalls.c4
-rw-r--r--sys/kern/vfs_vnops.c2
6 files changed, 9 insertions, 25 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 970861a..8e8e1ea 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -420,7 +420,7 @@ vop_stdcreatevobject(ap)
vrele(vp);
}
- KASSERT(vp->v_object != NULL, ("vfs_object_create: NULL object"));
+ KASSERT(vp->v_object != NULL, ("vop_stdcreatevobject: NULL object"));
vp->v_vflag |= VV_OBJBUF;
return (error);
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 17ef241..e1f8870 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -3957,7 +3957,7 @@ fhopen(td, uap)
* Make sure that a VM object is created for VMIO support.
*/
if (vn_canvmio(vp) == TRUE) {
- if ((error = vfs_object_create(vp, td, td->td_ucred)) != 0)
+ if ((error = VOP_CREATEVOBJECT(vp, td->td_ucred, td)) != 0)
goto bad;
}
if (fmode & FWRITE)
@@ -4011,7 +4011,7 @@ fhopen(td, uap)
fp->f_flag |= FHASLOCK;
}
if ((vp->v_type == VREG) && (VOP_GETVOBJECT(vp, NULL) != 0))
- vfs_object_create(vp, td, td->td_ucred);
+ VOP_CREATEVOBJECT(vp, td->td_ucred, td);
VOP_UNLOCK(vp, 0, td);
fdrop(fp, td);
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 2ab34c6..00f9bd5 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -207,8 +207,8 @@ namei(ndp)
(cnp->cn_nameiop != DELETE) &&
((cnp->cn_flags & (NOOBJ|LOCKLEAF)) ==
LOCKLEAF))
- vfs_object_create(ndp->ni_vp, td,
- ndp->ni_cnd.cn_cred);
+ VOP_CREATEVOBJECT(ndp->ni_vp,
+ ndp->ni_cnd.cn_cred, td);
return (0);
}
@@ -771,7 +771,7 @@ relookup(dvp, vpp, cnp)
if (vn_canvmio(dp) == TRUE &&
((cnp->cn_flags & (NOOBJ|LOCKLEAF)) == LOCKLEAF))
- vfs_object_create(dp, td, cnp->cn_cred);
+ VOP_CREATEVOBJECT(dp, cnp->cn_cred, td);
if ((cnp->cn_flags & LOCKLEAF) == 0)
VOP_UNLOCK(dp, 0, td);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 52b7b2d..4fda763 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2843,22 +2843,6 @@ loop:
}
/*
- * Create the VM object needed for VMIO and mmap support. This
- * is done for all VREG files in the system. Some filesystems might
- * afford the additional metadata buffering capability of the
- * VMIO code by making the device node be VMIO mode also.
- *
- * vp must be locked when vfs_object_create is called.
- */
-int
-vfs_object_create(struct vnode *vp, struct thread *td, struct ucred *cred)
-{
-
- GIANT_REQUIRED;
- return (VOP_CREATEVOBJECT(vp, cred, td));
-}
-
-/*
* Mark a vnode as free, putting it up for recycling.
*/
void
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 17ef241..e1f8870 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -3957,7 +3957,7 @@ fhopen(td, uap)
* Make sure that a VM object is created for VMIO support.
*/
if (vn_canvmio(vp) == TRUE) {
- if ((error = vfs_object_create(vp, td, td->td_ucred)) != 0)
+ if ((error = VOP_CREATEVOBJECT(vp, td->td_ucred, td)) != 0)
goto bad;
}
if (fmode & FWRITE)
@@ -4011,7 +4011,7 @@ fhopen(td, uap)
fp->f_flag |= FHASLOCK;
}
if ((vp->v_type == VREG) && (VOP_GETVOBJECT(vp, NULL) != 0))
- vfs_object_create(vp, td, td->td_ucred);
+ VOP_CREATEVOBJECT(vp, td->td_ucred, td);
VOP_UNLOCK(vp, 0, td);
fdrop(fp, td);
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 3e98446..dff2573 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -252,7 +252,7 @@ restart:
* restores the requested locking state.
*/
#endif
- if ((error = vfs_object_create(vp, td, cred)) != 0) {
+ if ((error = VOP_CREATEVOBJECT(vp, cred, td)) != 0) {
VOP_UNLOCK(vp, 0, td);
VOP_CLOSE(vp, fmode, cred, td);
NDFREE(ndp, NDF_ONLY_PNBUF);
OpenPOWER on IntegriCloud