summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>1999-08-12 20:38:32 +0000
committeralfred <alfred@FreeBSD.org>1999-08-12 20:38:32 +0000
commite7ab2e043a0b0029712c506e924393f99d7df1da (patch)
tree075ad78b6b763accb9301535d5a77cd1e0a14ad9 /sys/kern/vfs_extattr.c
parente54218a23dd2a5d10289aae2020046c045bc341c (diff)
downloadFreeBSD-src-e7ab2e043a0b0029712c506e924393f99d7df1da.zip
FreeBSD-src-e7ab2e043a0b0029712c506e924393f99d7df1da.tar.gz
Replace a redundant vfs_object_create() call (already done in vn_open)
with a KASSERT. Reviewed by: Eivind, Alan Cox
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index bedf79f..8d46d31 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.128 1999/08/04 04:52:18 imp Exp $
+ * $Id: vfs_syscalls.c,v 1.129 1999/08/04 18:53:48 green Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -1020,8 +1020,9 @@ open(p, uap)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
fp->f_flag |= FHASLOCK;
}
- if (vn_canvmio(vp) == TRUE && vp->v_object == NULL)
- vfs_object_create(vp, p, p->p_ucred);
+ /* assert that vn_open created a backing object if one is needed */
+ KASSERT(!vn_canvmio(vp) || vp->v_object != NULL,
+ ("open: vmio vnode has no backing object after vn_open"));
VOP_UNLOCK(vp, 0, p);
p->p_retval[0] = indx;
return (0);
OpenPOWER on IntegriCloud