From 3d3c223033a18b9340051138f921ba7c00606338 Mon Sep 17 00:00:00 2001 From: tomsoft Date: Tue, 5 Jun 2001 18:39:57 +0000 Subject: fix a bug of a only partitally initialization which could result in an unclean filesystem after growing by a large amount of cylinder groups Reviewed by: chm --- sbin/growfs/growfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sbin/growfs') diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index affae8e..370344a 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1244,7 +1244,8 @@ updcsloc(time_t utime, int fsi, int fso, int Nflag) if(bp == NULL) { errx(1, "malloc failed"); } - memset((char *)bp, 0, sizeof(struct gfs_bpp)); + memset((char *)bp, 0, ((dupper-odupper)/sblock.fs_frag+2)* + sizeof(struct gfs_bpp)); /* * Lock all new frags needed for the cylinder group summary. This is -- cgit v1.1