[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/14] block/nbd: drop nbd_free_connect_thread()
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH 07/14] block/nbd: drop nbd_free_connect_thread() |
Date: |
Wed, 7 Apr 2021 13:46:30 +0300 |
Now it's only a wrapper on g_free, we don't need it. Also, it's
clearing the state of nbd connect thread callback, not thread itself,
so name is not very good. Drop it.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block/nbd.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index 23eb8adab1..4e669d762a 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -382,11 +382,6 @@ static void nbd_init_connect_thread(BDRVNBDState *s)
qemu_mutex_init(&s->connect_thread->mutex);
}
-static void nbd_free_connect_thread(NBDConnectCB *thr)
-{
- g_free(thr);
-}
-
static void connect_thread_cb(QIOChannelSocket *sioc, int ret, void *opaque)
{
NBDConnectCB *thr = opaque;
@@ -416,7 +411,7 @@ static void connect_thread_cb(QIOChannelSocket *sioc, int
ret, void *opaque)
qemu_mutex_unlock(&thr->mutex);
if (do_free) {
- nbd_free_connect_thread(thr);
+ g_free(thr);
}
}
@@ -581,7 +576,7 @@ static void
nbd_co_establish_connection_cancel(BlockDriverState *bs,
qemu_mutex_unlock(&thr->mutex);
if (do_free) {
- nbd_free_connect_thread(thr);
+ g_free(thr);
s->connect_thread = NULL;
}
--
2.29.2
- [PATCH 03/14] block/nbd: drop unused NBDConnectThread::err field, (continued)
- [PATCH 03/14] block/nbd: drop unused NBDConnectThread::err field, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 04/14] block/nbd: split connect_thread_cb() out of connect_thread_func(), Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 02/14] block/nbd: nbd_co_establish_connection(): drop unused errp, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 06/14] block/nbd: further segregation of connect-thread, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 05/14] block/nbd: rename NBDConnectThread to NBDConnectCB, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 08/14] block/nbd: move nbd connect-thread to nbd/client-connect.c, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 07/14] block/nbd: drop nbd_free_connect_thread(),
Vladimir Sementsov-Ogievskiy <=
- [PATCH 09/14] block/nbd: NBDConnectCB: drop bh_* fields, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 10/14] block/nbd: move wait_connect field under mutex protection, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 11/14] block/nbd: refactor connect_bh(), Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 12/14] block/nbd: refactor nbd_co_establish_connection, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 13/14] block/nbd: nbd_co_establish_connection_cancel(): rename wake to do_wake, Vladimir Sementsov-Ogievskiy, 2021/04/07
- [PATCH 14/14] block/nbd: drop thr->state, Vladimir Sementsov-Ogievskiy, 2021/04/07
- DROP THIS Re: [PATCH 00/14] nbd: move reconnect-thread to separate file, Vladimir Sementsov-Ogievskiy, 2021/04/08