summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2006-06-25 05:47:26 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:01:03 -0700
commit2e006393ba5b599d9c43f94f8d8989e68131433e (patch)
tree541161158464b388db66093ec9eb25425b0e2d5e /fs
parent50aa4eb0b978f4a0283471c776ed812269ac8af5 (diff)
downloadop-kernel-dev-2e006393ba5b599d9c43f94f8d8989e68131433e.zip
op-kernel-dev-2e006393ba5b599d9c43f94f8d8989e68131433e.tar.gz
[PATCH] ufs: unlock_super without lock
ufs_free_blocks function looks now in so way: if (err) goto failed; lock_super(); failed: unlock_super(); So if error happen we'll unlock not locked super. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ufs/balloc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index 62193db..ac709e7 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -156,7 +156,7 @@ do_more:
bit = ufs_dtogd (fragment);
if (cgno >= uspi->s_ncg) {
ufs_panic (sb, "ufs_free_blocks", "freeing blocks are outside device");
- goto failed;
+ goto failed_unlock;
}
end_bit = bit + count;
if (end_bit > uspi->s_fpg) {
@@ -167,11 +167,11 @@ do_more:
ucpi = ufs_load_cylinder (sb, cgno);
if (!ucpi)
- goto failed;
+ goto failed_unlock;
ucg = ubh_get_ucg (UCPI_UBH(ucpi));
if (!ufs_cg_chkmagic(sb, ucg)) {
ufs_panic (sb, "ufs_free_blocks", "internal error, bad magic number on cg %u", cgno);
- goto failed;
+ goto failed_unlock;
}
for (i = bit; i < end_bit; i += uspi->s_fpb) {
@@ -210,8 +210,9 @@ do_more:
UFSD("EXIT\n");
return;
-failed:
+failed_unlock:
unlock_super (sb);
+failed:
UFSD("EXIT (FAILED)\n");
return;
}
OpenPOWER on IntegriCloud