From patchwork Mon Feb 25 12:31:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 10828511 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8EC0917E6 for ; Mon, 25 Feb 2019 12:38:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C2B42B063 for ; Mon, 25 Feb 2019 12:38:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A4712B318; Mon, 25 Feb 2019 12:38:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1DC282B063 for ; Mon, 25 Feb 2019 12:38:27 +0000 (UTC) Received: from localhost ([127.0.0.1]:36345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyFWd-0001GL-6q for patchwork-qemu-devel@patchwork.kernel.org; Mon, 25 Feb 2019 07:38:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyFQG-000511-Jh for qemu-devel@nongnu.org; Mon, 25 Feb 2019 07:31:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyFQC-00051X-4U for qemu-devel@nongnu.org; Mon, 25 Feb 2019 07:31:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56922) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyFQB-00050z-Ur for qemu-devel@nongnu.org; Mon, 25 Feb 2019 07:31:48 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 44D47307DAC1; Mon, 25 Feb 2019 12:31:47 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 540D85D71A; Mon, 25 Feb 2019 12:31:34 +0000 (UTC) From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= To: qemu-devel@nongnu.org Date: Mon, 25 Feb 2019 12:31:03 +0000 Message-Id: <20190225123111.30363-4-berrange@redhat.com> In-Reply-To: <20190225123111.30363-1-berrange@redhat.com> References: <20190225123111.30363-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 25 Feb 2019 12:31:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/11] hw/usb: don't set IN_ISDIR for inotify watch in MTP driver X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Roth , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , "Dr. David Alan Gilbert" , Markus Armbruster , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Andreas_F=C3=A4rber?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP IN_ISDIR is not a bit that one can request when registering a watch with inotify_add_watch. Rather it is a bit that is set automatically when reading events from the kernel. Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé --- hw/usb/dev-mtp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index f1d20fa1b9..f0c52a476a 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -653,8 +653,7 @@ static void usb_mtp_inotify_cleanup(MTPState *s) static int usb_mtp_add_watch(int inotifyfd, char *path) { - uint32_t mask = IN_CREATE | IN_DELETE | IN_MODIFY | - IN_ISDIR; + uint32_t mask = IN_CREATE | IN_DELETE | IN_MODIFY; return inotify_add_watch(inotifyfd, path, mask); }