adjust file size in write only if file grows. but since this change is

in the "never use ubc" branch, I don't think it matters except for cosmetics.
This commit is contained in:
pooka 2006-12-05 23:07:42 +00:00
parent a0eb335104
commit a966070d38

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_vnops.c,v 1.19 2006/12/05 23:03:28 pooka Exp $ */
/* $NetBSD: puffs_vnops.c,v 1.20 2006/12/05 23:07:42 pooka Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.19 2006/12/05 23:03:28 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.20 2006/12/05 23:07:42 pooka Exp $");
#include <sys/param.h>
#include <sys/vnode.h>
@ -1513,6 +1513,7 @@ puffs_write(void *v)
}
/* adjust file size */
if (vp->v_size < uio->uio_offset)
uvm_vnp_setsize(vp, uio->uio_offset);
/* didn't move everything? bad userspace. bail */