null_blk: Fix the problem "mutex_destroy missing"
PATCH 1/1 null_blk: Fix the problem "mutex_destroy missing"
When a mutex lock is not used any more, the function mutex_destroy should be called to mark the mutex lock uninitialized.
--- drivers/block/null_blk/main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/block/null_blk/main.c +2 -0
@@ -2113,6 +2113,8 @@ static void __exit null_exit(void)if (tag_set.ops)blk_mq_free_tag_set (&tag_set); + +mutex_destroy (&lock); }module_init (null_init);
Signature · 1 line
2.20.1
Quoted 3 lines · Zhu Yanjun
When a mutex lock is not used any more, the function
mutex_destroyshould be called to mark the mutex lock uninitialized.
Sorry. Fixes tag is missing.
I will send out the V2 with this Fixes tag.
Zhu Yanjun
Quoted 18 lines
Signed-off-by Zhu Yanjun <[email protected]>--- drivers/block/null_blk/main.c | 2 ++ 1 file changed, 2 insertions(+)drivers/block/null_blk/main.c +2
-0@@ -2113,6 +2113,8 @@ static void __exit null_exit(void)if (tag_set.ops)blk_mq_free_tag_set (&tag_set); + +mutex_destroy (&lock); }module_init (null_init);
Jens Axboe
maintainerQuoted 7 lines · Zhu Yanjun
? 2024/4/25 17:38, Zhu Yanjun ??:
Quoted 3 lines
When a mutex lock is not used any more, the function
mutex_destroyshould be called to mark the mutex lock uninitialized.Sorry. Fixes tag is missing.
I will send out the V2 with this Fixes tag.
Then please also fix the commit title, it's pretty bad. Make it something ala:
null_blk: fix missing mutex_destroy() at module removal
Signature · 1 line
Jens Axboe
Quoted 9 lines · Jens Axboe
Quoted 6 lines · Zhu Yanjun
? 2024/4/25 17:38, Zhu Yanjun ??:
Quoted 3 lines
When a mutex lock is not used any more, the function
mutex_destroyshould be called to mark the mutex lock uninitialized.Sorry. Fixes tag is missing.
I will send out the V2 with this Fixes tag.Then please also fix the commit title, it's pretty bad. Make it something ala:
Got it.
Zhu Yanjun
Quoted 2 lines
null_blk: fix missingmutex_destroy()at module removal
Signature · 1 line
I only represent myself.