block/rnbd: Remove a useless mutex
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 7 Feb 2022 20:48:19 +0000 (21:48 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Feb 2022 13:58:33 +0000 (06:58 -0700)
commita41cdf83a63122e5c5fb8c8550b812b25a332577
treea87599ba615df9c2fde9c8350c32e5d6788e7799
parent448025c103938d944f88db9671c1c224295deeae
block/rnbd: Remove a useless mutex

According to lib/idr.c,
   The IDA handles its own locking.  It is safe to call any of the IDA
   functions without synchronisation in your code.

so the 'ida_lock' mutex can just be removed.
It is here only to protect some ida_simple_get()/ida_simple_remove() calls.

While at it, switch to ida_alloc_XXX()/ida_free() instead to
ida_simple_get()/ida_simple_remove().
The latter is deprecated and more verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/7f9eccd8b1fce1bac45ac9b01a78cf72f54c0a61.1644266862.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt.c