diff options
-rw-r--r-- | fs/ufs/balloc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index 62193db34346..ac709e70f646 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c | |||
@@ -156,7 +156,7 @@ do_more: | |||
156 | bit = ufs_dtogd (fragment); | 156 | bit = ufs_dtogd (fragment); |
157 | if (cgno >= uspi->s_ncg) { | 157 | if (cgno >= uspi->s_ncg) { |
158 | ufs_panic (sb, "ufs_free_blocks", "freeing blocks are outside device"); | 158 | ufs_panic (sb, "ufs_free_blocks", "freeing blocks are outside device"); |
159 | goto failed; | 159 | goto failed_unlock; |
160 | } | 160 | } |
161 | end_bit = bit + count; | 161 | end_bit = bit + count; |
162 | if (end_bit > uspi->s_fpg) { | 162 | if (end_bit > uspi->s_fpg) { |
@@ -167,11 +167,11 @@ do_more: | |||
167 | 167 | ||
168 | ucpi = ufs_load_cylinder (sb, cgno); | 168 | ucpi = ufs_load_cylinder (sb, cgno); |
169 | if (!ucpi) | 169 | if (!ucpi) |
170 | goto failed; | 170 | goto failed_unlock; |
171 | ucg = ubh_get_ucg (UCPI_UBH(ucpi)); | 171 | ucg = ubh_get_ucg (UCPI_UBH(ucpi)); |
172 | if (!ufs_cg_chkmagic(sb, ucg)) { | 172 | if (!ufs_cg_chkmagic(sb, ucg)) { |
173 | ufs_panic (sb, "ufs_free_blocks", "internal error, bad magic number on cg %u", cgno); | 173 | ufs_panic (sb, "ufs_free_blocks", "internal error, bad magic number on cg %u", cgno); |
174 | goto failed; | 174 | goto failed_unlock; |
175 | } | 175 | } |
176 | 176 | ||
177 | for (i = bit; i < end_bit; i += uspi->s_fpb) { | 177 | for (i = bit; i < end_bit; i += uspi->s_fpb) { |
@@ -210,8 +210,9 @@ do_more: | |||
210 | UFSD("EXIT\n"); | 210 | UFSD("EXIT\n"); |
211 | return; | 211 | return; |
212 | 212 | ||
213 | failed: | 213 | failed_unlock: |
214 | unlock_super (sb); | 214 | unlock_super (sb); |
215 | failed: | ||
215 | UFSD("EXIT (FAILED)\n"); | 216 | UFSD("EXIT (FAILED)\n"); |
216 | return; | 217 | return; |
217 | } | 218 | } |