From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XknQX-0001rn-0C for qemu-devel@nongnu.org; Sun, 02 Nov 2014 01:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XknQS-0000Ic-6A for qemu-devel@nongnu.org; Sun, 02 Nov 2014 01:10:08 -0400 Message-ID: <5455BC84.8070104@huawei.com> Date: Sun, 2 Nov 2014 13:09:24 +0800 From: Gonglei MIME-Version: 1.0 References: <1414735861-1232-1-git-send-email-arei.gonglei@huawei.com> <1414735861-1232-2-git-send-email-arei.gonglei@huawei.com> <5455BBB8.5040205@msgid.tls.msk.ru> In-Reply-To: <5455BBB8.5040205@msgid.tls.msk.ru> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/2] tap: remove close(fd) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: "qemu-trivial@nongnu.org" , "qemu-devel@nongnu.org" , "stefanha@redhat.com" , "Huangpeng (Peter)" On 2014/11/2 13:06, Michael Tokarev wrote: > 31.10.2014 09:11, arei.gonglei@huawei.com wrote: >> From: Gonglei >> >> commit 5193e5fb (tap: factor out common tap initialization) >> introduce net_init_tap_one(). But it's inapposite that close >> fd in net_init_tap_one(), we should lay it in the caller, >> becuase some caller needn't to close it if we get the fd >> by monitor_handle_fd_param(). >> >> On the other hand, in other exceptional branch fd doesn't >> be closed, so that's incomplete. > > Applied to -trivial, with grammar tweaking in commit message > and with slightly better (in my opinion) subject, like this: > Ack. Thanks for your work. :) Best regards, -Gonglei > tap: do not close(fd) in net_init_tap_one() > > commit 5193e5fb (tap: factor out common tap initialization) > introduce net_init_tap_one(). But it's inappropriate that > we close fd in net_init_tap_one(), we should lay it in the > caller, becuase some callers needn't to close it if we get > the fd by monitor_handle_fd_param(). > > On the other hand, in other exceptional branches fd isn't > closed, so that's incomplete anyway. > > Thanks, > > /mjt