From d0b95300904082430414b2a5fd82a933120d055f Mon Sep 17 00:00:00 2001 From: reinoud Date: Wed, 3 Jul 2013 11:50:59 +0000 Subject: [PATCH] On growing a node that was recorded inside the (E)FE, don't forget to set the size of the node to the NEW size. This was reported by the `t_io udf_shrinkfile' testcase. Fixes PR kern/47985 --- sys/fs/udf/udf_allocation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/fs/udf/udf_allocation.c b/sys/fs/udf/udf_allocation.c index bb59b013d905..cffb861a85f5 100644 --- a/sys/fs/udf/udf_allocation.c +++ b/sys/fs/udf/udf_allocation.c @@ -1,4 +1,4 @@ -/* $NetBSD: udf_allocation.c,v 1.32 2011/06/16 09:21:02 hannken Exp $ */ +/* $NetBSD: udf_allocation.c,v 1.33 2013/07/03 11:50:59 reinoud Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -28,7 +28,7 @@ #include #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.32 2011/06/16 09:21:02 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.33 2013/07/03 11:50:59 reinoud Exp $"); #endif /* not lint */ @@ -2706,8 +2706,8 @@ udf_grow_node(struct udf_node *udf_node, uint64_t new_size) error = 0; /* set new size for uvm */ - uvm_vnp_setsize(vp, old_size); uvm_vnp_setwritesize(vp, new_size); + uvm_vnp_setsize(vp, new_size); #if 0 /* zero append space in buffer */