From: Matthew Dillon Date: Mon, 10 Dec 2012 23:02:01 +0000 (-0800) Subject: kernel - Fix softupdates panic with UFS X-Git-Tag: v3.2.2~4 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/47abd9f81a11b87d5f2a581a832527a2662c6093 kernel - Fix softupdates panic with UFS * If getdirtybuf() was unable to lookup a dirty buffer from the flush_pagedep_deps path, we need to retry the lookup, rather than proceeding through processing the diradd. Reported-by: marino@ Submitted-by: vsrinivas --- diff --git a/sys/vfs/ufs/ffs_softdep.c b/sys/vfs/ufs/ffs_softdep.c index b6a8cbf897..d8a91f638d 100644 --- a/sys/vfs/ufs/ffs_softdep.c +++ b/sys/vfs/ufs/ffs_softdep.c @@ -4593,6 +4593,7 @@ flush_pagedep_deps(struct vnode *pvp, struct mount *mp, * locate that buffer, ensure that there will be no rollback * caused by a bitmap dependency, then write the inode buffer. */ +retry_lookup: if (inodedep_lookup(ump->um_fs, inum, 0, &inodedep) == 0) { panic("flush_pagedep_deps: lost inode"); } @@ -4602,6 +4603,8 @@ flush_pagedep_deps(struct vnode *pvp, struct mount *mp, */ if ((inodedep->id_state & DEPCOMPLETE) == 0) { gotit = getdirtybuf(&inodedep->id_buf, MNT_WAIT); + if (gotit == 0) + goto retry_lookup; FREE_LOCK(&lk); if (gotit && (error = bwrite(inodedep->id_buf)) != 0) break;