From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zywef-0000vC-9L for qemu-devel@nongnu.org; Wed, 18 Nov 2015 01:55:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zywec-0003Zb-1m for qemu-devel@nongnu.org; Wed, 18 Nov 2015 01:55:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zyweb-0003ZN-OL for qemu-devel@nongnu.org; Wed, 18 Nov 2015 01:55:41 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id CA3F0155DE for ; Wed, 18 Nov 2015 06:55:40 +0000 (UTC) Message-ID: <1447829738.23726.83.camel@redhat.com> From: Gerd Hoffmann Date: Wed, 18 Nov 2015 07:55:38 +0100 In-Reply-To: References: <1447718794-19812-1-git-send-email-bsd@redhat.com> <1447718794-19812-4-git-send-email-bsd@redhat.com> <1447761819.23726.74.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based file monitoring List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bandan Das Cc: qemu-devel@nongnu.org Hi, > >> - QLIST_FOREACH(iter, &o->children, list) { > >> + QLIST_FOREACH_SAFE(iter, &o->children, list, next) { > >> handles[i++] = iter->handle; > >> } > > > > No need for SAFE here, you don't change the list. > > Isn't the SAFE variant better for the case where a inotify delete event occurs > when we are getting the object handles ? Device emulation runs under lock, therefore all serialized, so the inotify event processing will not run in parallel. cheers, Gerd