From bebcac052a019a9818c1870622294ee2675b48ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hyman=20Huang=28=E9=BB=84=E5=8B=87=29?= Date: Wed, 21 Dec 2022 21:06:39 +0800 Subject: vhost-user: Refactor the chr_closed_bh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use vhost_user_save_acked_features to implemente acked features saving. Signed-off-by: Hyman Huang(黄勇) Signed-off-by: Guoyi Tu Message-Id: <6699ee88687b62fb8152fe021e576cd2f468d7ca.1671627406.git.huangy81@chinatelecom.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-user.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'net/vhost-user.c') diff --git a/net/vhost-user.c b/net/vhost-user.c index f5cb095d5c..5993e4afca 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -260,11 +260,7 @@ static void chr_closed_bh(void *opaque) s = DO_UPCAST(NetVhostUserState, nc, ncs[0]); for (i = queues -1; i >= 0; i--) { - s = DO_UPCAST(NetVhostUserState, nc, ncs[i]); - - if (s->vhost_net) { - s->acked_features = vhost_net_get_acked_features(s->vhost_net); - } + vhost_user_save_acked_features(ncs[i]); } qmp_set_link(name, false, &err); -- cgit v1.2.3