Fix the glitch introduced in rev. 1.93. In softdep_sync_metadata(),

switch by worklist type contains two for() loops, for D_INDIRDEP and
D_PAGEDEP. On error, these loops are exited by break, where the switch
actually shall be leaved. Use goto instead of break to reach the error
handling code.

Reported by:	Peter Holm
Reviewed by:	tegge
Approved by:	pjd (mentor)
MFC after:	2 weeks
This commit is contained in:
Konstantin Belousov 2006-09-20 07:49:28 +00:00
parent 783deec19e
commit 28de2218ec

View File

@ -5269,7 +5269,7 @@ loop:
goto restart;
FREE_LOCK(&lk);
if ((error = bwrite(nbp)) != 0) {
break;
goto loop_end;
}
ACQUIRE_LOCK(&lk);
goto restart;
@ -5300,7 +5300,7 @@ loop:
flush_pagedep_deps(vp, wk->wk_mp,
&pagedep->pd_diraddhd[i]))) {
FREE_LOCK(&lk);
break;
goto loop_end;
}
}
continue;
@ -5352,6 +5352,7 @@ loop:
TYPENAME(wk->wk_type));
/* NOTREACHED */
}
loop_end:
/* We reach here only in error and unlocked */
if (error == 0)
panic("softdep_sync_metadata: zero error");