diff options
author | kib <kib@FreeBSD.org> | 2006-09-20 07:49:28 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2006-09-20 07:49:28 +0000 |
commit | edd4f4618e13a37fbad6b145e2058111190b723e (patch) | |
tree | 63854aa95376142ef2808452480fc2041de1e4e3 | |
parent | 32e23e90df7a476dfa1fdb6c1c52e0f75063f240 (diff) | |
download | FreeBSD-src-edd4f4618e13a37fbad6b145e2058111190b723e.zip FreeBSD-src-edd4f4618e13a37fbad6b145e2058111190b723e.tar.gz |
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
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index fca4d25..d2f6015 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -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"); |