From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO54Z-0005vF-Kd for qemu-devel@nongnu.org; Thu, 13 Mar 2014 08:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO54U-00030W-RX for qemu-devel@nongnu.org; Thu, 13 Mar 2014 08:49:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO54U-00030J-Ju for qemu-devel@nongnu.org; Thu, 13 Mar 2014 08:49:14 -0400 Date: Thu, 13 Mar 2014 13:48:09 +0100 From: Stefan Hajnoczi Message-ID: <20140313124809.GA15090@stefanha-thinkpad.redhat.com> References: <1394643267-1194-1-git-send-email-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1394643267-1194-1-git-send-email-pagupta@redhat.com> Subject: Re: [Qemu-devel] [PATCH] Avoiding extra iterations while closing file fd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pankaj Gupta Cc: qemu-devel@nongnu.org, aliguori@amazon.com On Wed, Mar 12, 2014 at 10:24:27PM +0530, Pankaj Gupta wrote: > Avoiding iterations for fd 0, 1 & 2 when we are closing file fds in child process. > > Signed-off-by: Pankaj Gupta > --- > net/tap.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) POSIX defines the values of standard in, out, and error as 0, 1, and 2 constants. So this patch is correct but it doesn't do anything useful. This is something compiler can optimize (but speed doesn't even matter here). Please try to focus on patches that fix bugs, add features, or otherwise add value - it takes the community time to review, test, and merge patches. Thanks, applied to my net-next tree: https://github.com/stefanha/qemu/commits/net-next Stefan