Skip to contentSkip to conversation

udf: destroy sbi mutex in put_super

PATCH Applied Fabian Frederick 2 participants 2 messages Jan 10, 2015 – Jan 12, 2015 UDF filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 udf: destroy sbi mutex in put_super

Call mutex_destroy() on superblock mutex in udf_put_super() otherwise mutex debugging code isn't able to detect that mutex is used after being freed.
(thanks to Jan Kara for complete definition).

---
 fs/udf/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/udf/super.c +1 -0
index 3ccb2f1..3d35a75 100644
@@ -2300,6 +2300,7 @@ static void udf_put_super(struct super_block *sb)
 		udf_close_lvid(sb);
 	brelse(sbi->s_lvid_bh);
 	udf_sb_free_partitions(sb);
+	mutex_destroy(&sbi->s_alloc_mutex);
 	kfree(sb->s_fs_info);
 	sb->s_fs_info = NULL;
 }
Signature · 1 line
2.1.0
Applied
#1 lore raw
Quoted 4 lines · Fabian Frederick

Call mutex_destroy() on superblock mutex in udf_put_super() otherwise mutex debugging code isn't able to detect that mutex is used after being freed.
(thanks to Jan Kara for complete definition).

Applied, thanks.

Honza

Quoted 21 lines
---
 fs/udf/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/udf/super.c +1 -0
index 3ccb2f1..3d35a75 100644
@@ -2300,6 +2300,7 @@ static void udf_put_super(struct super_block *sb)
 		udf_close_lvid(sb);
 	brelse(sbi->s_lvid_bh);
 	udf_sb_free_partitions(sb);
+	mutex_destroy(&sbi->s_alloc_mutex);
 	kfree(sb->s_fs_info);
 	sb->s_fs_info = NULL;
 }
Signature · 1 line
2.1.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR