From ce33967af74523685c7f911f6576c689728fcc81 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 18 Sep 2012 13:17:52 +0200 Subject: nbd: make refcount interface public After the next patch, the close callback will have to release its reference. Signed-off-by: Paolo Bonzini --- nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nbd.c') diff --git a/nbd.c b/nbd.c index 83200bdccd..4aeb80ae18 100644 --- a/nbd.c +++ b/nbd.c @@ -647,12 +647,12 @@ static ssize_t nbd_send_reply(int csock, struct nbd_reply *reply) #define MAX_NBD_REQUESTS 16 -static void nbd_client_get(NBDClient *client) +void nbd_client_get(NBDClient *client) { client->refcount++; } -static void nbd_client_put(NBDClient *client) +void nbd_client_put(NBDClient *client) { if (--client->refcount == 0) { g_free(client); -- cgit v1.2.1