ext3: destroy sbi mutexes in put_super
authorFabian Frederick <fabf@skynet.be>
Sat, 27 Dec 2014 15:01:22 +0000 (16:01 +0100)
committerJan Kara <jack@suse.cz>
Mon, 5 Jan 2015 10:13:55 +0000 (11:13 +0100)
Call mutex_destroy() on superblock mutexes in ext3_put_super().
Otherwise mutex debugging code isn't able to detect that mutex is used
after being freed.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/super.c

index 9b4e7d750d4fdf23571e4d95a816349d78530856..d4dbf3c259b3288a961304daff37d7e1a848e43f 100644 (file)
@@ -466,6 +466,8 @@ static void ext3_put_super (struct super_block * sb)
        }
        sb->s_fs_info = NULL;
        kfree(sbi->s_blockgroup_lock);
+       mutex_destroy(&sbi->s_orphan_lock);
+       mutex_destroy(&sbi->s_resize_lock);
        kfree(sbi);
 }