summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Cracauer <cracauer@FreeBSD.org>2005-10-28 18:44:26 +0000
committerMartin Cracauer <cracauer@FreeBSD.org>2005-10-28 18:44:26 +0000
commit95dfc0a1cca22624aed52bae2a3540e42d51a4d0 (patch)
treed94da457b6ea8f80660befd4bb4f194c2d5822ed
parent5e4677ca87bf022a6d743f7cdd047e2de9018be6 (diff)
Notes
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vnops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c
index 30d3d57a5e6a..4a8482e9145a 100644
--- a/sys/gnu/fs/ext2fs/ext2_vnops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vnops.c
@@ -237,9 +237,8 @@ ext2_create(ap)
/*
* Open called.
- *
- * Nothing to do.
*/
+
static int
ext2_open(ap)
struct vop_open_args /* {
@@ -249,6 +248,8 @@ ext2_open(ap)
struct thread *a_td;
} */ *ap;
{
+ struct vnode *vp = ap->a_vp;
+ struct inode *ip = VTOI(vp);
if (ap->a_vp->v_type == VBLK || ap->a_vp->v_type == VCHR)
return (EOPNOTSUPP);
@@ -259,6 +260,9 @@ ext2_open(ap)
if ((VTOI(ap->a_vp)->i_flags & APPEND) &&
(ap->a_mode & (FWRITE | O_APPEND)) == FWRITE)
return (EPERM);
+
+ vnode_create_vobject(ap->a_vp, ip->i_size, ap->a_td);
+
return (0);
}