[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based f
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH v3 3/4] usb-mtp: Add support for inotify based file monitoring |
Date: |
Wed, 18 Nov 2015 07:55:38 +0100 |
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