[PATCH] Locking problems while EXT3FS_DEBUG on
I noticed some problems while running ext3 with the debug flag set on. More precisely, I was unable to umount the filesystem. Some investigation took me to the patch that follows. At a first glance , the lock/unlock I've taken out seems really not necessary, as the main code (outside debug) does not lock the super. The only additional danger operations that debug code introduces seems to be related to bitmap, but bitmap operations tends to be all atomic anyway. I also took the opportunity to fix 2 spelling errors. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
2384f55f8a
commit
5b11687924
@@ -704,7 +704,6 @@ unsigned long ext3_count_free_inodes (struct super_block * sb)
|
||||
unsigned long bitmap_count, x;
|
||||
struct buffer_head *bitmap_bh = NULL;
|
||||
|
||||
lock_super (sb);
|
||||
es = EXT3_SB(sb)->s_es;
|
||||
desc_count = 0;
|
||||
bitmap_count = 0;
|
||||
@@ -727,7 +726,6 @@ unsigned long ext3_count_free_inodes (struct super_block * sb)
|
||||
brelse(bitmap_bh);
|
||||
printk("ext3_count_free_inodes: stored = %u, computed = %lu, %lu\n",
|
||||
le32_to_cpu(es->s_free_inodes_count), desc_count, bitmap_count);
|
||||
unlock_super(sb);
|
||||
return desc_count;
|
||||
#else
|
||||
desc_count = 0;
|
||||
|
Reference in New Issue
Block a user