From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fFkYs-0008OV-Dh for qemu-devel@nongnu.org; Mon, 07 May 2018 14:08:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fFkYr-0005v9-Hq for qemu-devel@nongnu.org; Mon, 07 May 2018 14:08:34 -0400 References: <20180507154458.73945-1-vsementsov@virtuozzo.com> <20180507154458.73945-6-vsementsov@virtuozzo.com> From: Eric Blake Message-ID: Date: Mon, 7 May 2018 13:08:24 -0500 MIME-Version: 1.0 In-Reply-To: <20180507154458.73945-6-vsementsov@virtuozzo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/5] block/nbd-client: don't check ioc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, qemu-block@nongnu.org Cc: mreitz@redhat.com, kwolf@redhat.com, pbonzini@redhat.com, den@openvz.org On 05/07/2018 10:44 AM, Vladimir Sementsov-Ogievskiy wrote: > We have several paranoiac checks for ioc != NULL. But ioc may become > NULL only on close, which should not happen during requests handling. > Also, we check ioc only sometimes, not after each yield, which is > inconsistent. Let's drop these checks. Can (or even should) any of these be replaced by asserts that ioc is not NULL? > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd-client.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org