linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] aoe: remove unnecessary mutex_init()
@ 2021-05-11 11:34 Yang Yingliang
  2021-05-11 14:15 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Yingliang @ 2021-05-11 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-block; +Cc: justin, axboe

The mutex ktio_spawn_lock is initialized statically.
It is unnecessary to initialize by mutex_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/block/aoe/aoecmd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index ecd77897a761..588889bea7c3 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1701,8 +1701,6 @@ aoecmd_init(void)
 		goto ktiowq_fail;
 	}
 
-	mutex_init(&ktio_spawn_lock);
-
 	for (i = 0; i < ncpus; i++) {
 		INIT_LIST_HEAD(&iocq[i].head);
 		spin_lock_init(&iocq[i].lock);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] aoe: remove unnecessary mutex_init()
  2021-05-11 11:34 [PATCH -next] aoe: remove unnecessary mutex_init() Yang Yingliang
@ 2021-05-11 14:15 ` Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-05-11 14:15 UTC (permalink / raw)
  To: Yang Yingliang, linux-kernel, linux-block; +Cc: justin

On 5/11/21 5:34 AM, Yang Yingliang wrote:
> The mutex ktio_spawn_lock is initialized statically.
> It is unnecessary to initialize by mutex_init().

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -next] aoe: remove unnecessary mutex_init()
@ 2020-09-16  6:20 Qinglang Miao
  0 siblings, 0 replies; 3+ messages in thread
From: Qinglang Miao @ 2020-09-16  6:20 UTC (permalink / raw)
  To: Justin Sanders, Jens Axboe; +Cc: linux-block, linux-kernel, Qinglang Miao

The mutex ktio_spawn_lock is initialized statically. It is
unnecessary to initialize by mutex_init().

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/block/aoe/aoecmd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 313f0b946..d5d4a8460 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1708,8 +1708,6 @@ aoecmd_init(void)
 		goto ktiowq_fail;
 	}
 
-	mutex_init(&ktio_spawn_lock);
-
 	for (i = 0; i < ncpus; i++) {
 		INIT_LIST_HEAD(&iocq[i].head);
 		spin_lock_init(&iocq[i].lock);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-11 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 11:34 [PATCH -next] aoe: remove unnecessary mutex_init() Yang Yingliang
2021-05-11 14:15 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2020-09-16  6:20 Qinglang Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).