From: Chris Wright Subject: [PATCH] vhost-net: comment use of invalid fd when setting vhost backend Date: Tue, 22 Dec 2009 10:18:28 -0800 Message-ID: <20091222181828.GA2095@sequoia.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: rusty@rustcorp.com.au, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org To: "Michael S. Tsirkin" Return-path: Received: from sous-sol.org ([216.99.217.87]:53391 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751310AbZLVSTG (ORCPT ); Tue, 22 Dec 2009 13:19:06 -0500 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: This looks like an error case, but it's just a special case to shutdown the backend. Clarify with a comment. Signed-off-by: Chris Wright --- drivers/vhost/net.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 22d5fef..cc92086 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -465,6 +465,7 @@ static struct socket *get_tun_socket(int fd) static struct socket *get_socket(int fd) { struct socket *sock; + /* special case to disable backend */ if (fd == -1) return NULL; sock = get_raw_socket(fd);