Date: Sat, 15 Dec 2018 17:58:42 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342129 - head/sys/ufs/ffs Message-ID: <201812151758.wBFHwgEB060624@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Sat Dec 15 17:58:42 2018 New Revision: 342129 URL: https://svnweb.freebsd.org/changeset/base/342129 Log: Must set ip->i_effnlink = ip->i_nlink to avoid a soft updates "panic: softdep_update_inodeblock: bad link count" when releasing a partially initialized vnode after an inode check-hash failure. Reported by: Gary Jennejohn <gljennjohn@gmail.com> Reported by: Peter Holm (pho) Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_subr.c Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 17:32:47 2018 (r342128) +++ head/sys/ufs/ffs/ffs_subr.c Sat Dec 15 17:58:42 2018 (r342129) @@ -127,6 +127,7 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc *((struct ufs1_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); ip->i_mode = dip1->di_mode; ip->i_nlink = dip1->di_nlink; + ip->i_effnlink = dip1->di_nlink; ip->i_size = dip1->di_size; ip->i_flags = dip1->di_flags; ip->i_gen = dip1->di_gen; @@ -138,6 +139,7 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc *dip2 = *((struct ufs2_dinode *)bp->b_data + ino_to_fsbo(fs, ino)); ip->i_mode = dip2->di_mode; ip->i_nlink = dip2->di_nlink; + ip->i_effnlink = dip2->di_nlink; ip->i_size = dip2->di_size; ip->i_flags = dip2->di_flags; ip->i_gen = dip2->di_gen;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812151758.wBFHwgEB060624>