svn commit: r327552 - stable/11/usr.sbin/makefs

Mark Johnston markj at FreeBSD.org
Thu Jan 4 16:18:31 UTC 2018


Author: markj
Date: Thu Jan  4 16:18:30 2018
New Revision: 327552
URL: https://svnweb.freebsd.org/changeset/base/327552

Log:
  MFC r326912:
  Fix a logic bug in makefs lazy inode initialization.

Modified:
  stable/11/usr.sbin/makefs/ffs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/makefs/ffs.c
==============================================================================
--- stable/11/usr.sbin/makefs/ffs.c	Thu Jan  4 16:17:31 2018	(r327551)
+++ stable/11/usr.sbin/makefs/ffs.c	Thu Jan  4 16:18:30 2018	(r327552)
@@ -1134,7 +1134,7 @@ ffs_write_inode(union dinode *dp, uint32_t ino, const 
 	 * Initialize inode blocks on the fly for UFS2.
 	 */
 	initediblk = ufs_rw32(cgp->cg_initediblk, fsopts->needswap);
-	if (ffs_opts->version == 2 && cgino + INOPB(fs) > initediblk &&
+	while (ffs_opts->version == 2 && cgino + INOPB(fs) > initediblk &&
 	    initediblk < ufs_rw32(cgp->cg_niblk, fsopts->needswap)) {
 		memset(buf, 0, fs->fs_bsize);
 		dip = (struct ufs2_dinode *)buf;


More information about the svn-src-stable-11 mailing list