Skip to content

Commit 07d1b99

Browse files
zhuyjaxboe
authored andcommitted
null_blk: Fix missing mutex_destroy() at module removal
When a mutex lock is not used any more, the function mutex_destroy should be called to mark the mutex lock uninitialized. Fixes: f2298c0 ("null_blk: multi queue aware block test driver") Signed-off-by: Zhu Yanjun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent bf4f776 commit 07d1b99

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/block/null_blk/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,6 +2127,8 @@ static void __exit null_exit(void)
21272127

21282128
if (tag_set.ops)
21292129
blk_mq_free_tag_set(&tag_set);
2130+
2131+
mutex_destroy(&lock);
21302132
}
21312133

21322134
module_init(null_init);

0 commit comments

Comments
 (0)