diff options
author | tomsoft <tomsoft@FreeBSD.org> | 2001-06-05 18:39:57 +0000 |
---|---|---|
committer | tomsoft <tomsoft@FreeBSD.org> | 2001-06-05 18:39:57 +0000 |
commit | 3d3c223033a18b9340051138f921ba7c00606338 (patch) | |
tree | 5b3bb6ecd8ff3fb2911cceffd6e48fdd1654d527 | |
parent | 7283f3e69e8fa101ea4a1df6ad18a4b774fa284a (diff) | |
download | FreeBSD-src-3d3c223033a18b9340051138f921ba7c00606338.zip FreeBSD-src-3d3c223033a18b9340051138f921ba7c00606338.tar.gz |
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
-rw-r--r-- | sbin/growfs/growfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |