fs/affs/super.c: destroy sbi mutex in affs_kill_sb()
authorFabian Frederick <[email protected]>
Tue, 17 Feb 2015 21:46:17 +0000 (13:46 -0800)
committerLinus Torvalds <[email protected]>
Tue, 17 Feb 2015 22:34:52 +0000 (14:34 -0800)
Call mutex_destroy() on superblock mutex in affs_kill_sb() otherwise mutex
debugging code isn't able to detect that mutex is used after being freed.
(thanks to Jan Kara for complete definition).

Signed-off-by: Fabian Frederick <[email protected]>
Cc: Jan Kara <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/affs/super.c

index f754ab68a840a22d1d9eae18f78706a8537f07ea..ee8eca7add0e6c000cb97ebb3c02520cb4f987ab 100644 (file)
@@ -602,6 +602,7 @@ static void affs_kill_sb(struct super_block *sb)
                affs_free_bitmap(sb);
                affs_brelse(sbi->s_root_bh);
                kfree(sbi->s_prefix);
+               mutex_destroy(&sbi->s_bmlock);
                kfree(sbi);
        }
 }