[PATCH 1/1 linux-next] fs/affs/super.c: destroy sbi mutex in affs_kill_sb()

From: Fabian Frederick
Date: Tue Jan 13 2015 - 13:35:28 EST


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).

Cc: Jan Kara <jack@xxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
fs/affs/super.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/affs/super.c b/fs/affs/super.c
index f754ab6..ee8eca7 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -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);
}
}
--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/