From nobody Sun Feb 8 16:06:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582196649; cv=none; d=zohomail.com; s=zohoarc; b=eA9Bxwml5xAlqbf2B3ZhXWrUFoIxmtmdcGRI/cC1jeaKwM7Y5CC6KThe21uSeuJPB+JUUOlRfBTOa0E4wk3smJg8BNzbqoUU5pB+C3Jnp2ZLTvDR3XjFTQUP9e3ENFc9kCe2DkkICbGOoNP/M3dv4V+ebBiantMdIQZPhafo9SY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582196649; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hkSiqYXduF6QD8r0vUNLYD0PxotJn2y7jdaDbpSgF04=; b=N2pcfv+BznFsGEPyfE6WQJss0rAEhGCvMovtb7yUHYhCZ0+y7EQIRfz61EyomrBLgpLTl0cPvUrgeA42IkCRUlElIiRYS7YMMj3/w6HmbLnftiyCHdnamPKb0HLhKTN3LP//j5iKgbE7ODN4dDeOso114ePL/MeX9tqOjaLyzx8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1582196649810191.88326538216563; Thu, 20 Feb 2020 03:04:09 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-q5kCu-V3OGumKaJQRtju8Q-1; Thu, 20 Feb 2020 06:02:58 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 754AF1005516; Thu, 20 Feb 2020 11:02:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3832E10027B2; Thu, 20 Feb 2020 11:02:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CCB3518089CD; Thu, 20 Feb 2020 11:02:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01KB2jqf009986 for ; Thu, 20 Feb 2020 06:02:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id E26F719756; Thu, 20 Feb 2020 11:02:45 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67D7919C4F for ; Thu, 20 Feb 2020 11:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582196648; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hkSiqYXduF6QD8r0vUNLYD0PxotJn2y7jdaDbpSgF04=; b=Q6mJkqzC/WIL+VJ+nSqJza00V9zuhKtra9jSm6Tx1Y93TM18MvRFBQJ3j6D3twt4ewORy4 9q+wjMEsy+5bA56wTekV8P79rF233A7GxNtXJKkUgX6e/TnTYmT9QwWqusWaL2q6jUJnAq QAGz9IpqE0t+MDq2dfeZoi2LuvZd+fE= X-MC-Unique: q5kCu-V3OGumKaJQRtju8Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/3] qemu: Don't explicitly remove pidfile after virPidFileForceCleanupPath() Date: Thu, 20 Feb 2020 12:02:36 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" In two places where virPidFileForceCleanupPath() is called, we try to unlink() the pidfile again. This is needless because virPidFileForceCleanupPath() has done just that. Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 9 +-------- src/qemu/qemu_vhost_user_gpu.c | 10 +--------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index bf987a3bc3..8c1ed76677 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2802,14 +2802,7 @@ qemuProcessKillManagedPRDaemon(virDomainObjPtr vm) if (virPidFileForceCleanupPath(pidfile) < 0) { VIR_WARN("Unable to kill pr-helper process"); } else { - if (unlink(pidfile) < 0 && - errno !=3D ENOENT) { - virReportSystemError(errno, - _("Unable to remove stale pidfile %s"), - pidfile); - } else { - priv->prDaemonRunning =3D false; - } + priv->prDaemonRunning =3D false; } virErrorRestore(&orig_err); } diff --git a/src/qemu/qemu_vhost_user_gpu.c b/src/qemu/qemu_vhost_user_gpu.c index 51244f9b35..ae1f530338 100644 --- a/src/qemu/qemu_vhost_user_gpu.c +++ b/src/qemu/qemu_vhost_user_gpu.c @@ -223,16 +223,8 @@ void qemuExtVhostUserGPUStop(virQEMUDriverPtr driver, } =20 virErrorPreserveLast(&orig_err); - if (virPidFileForceCleanupPath(pidfile) < 0) { + if (virPidFileForceCleanupPath(pidfile) < 0) VIR_WARN("Unable to kill vhost-user-gpu process"); - } else { - if (unlink(pidfile) < 0 && - errno !=3D ENOENT) { - virReportSystemError(errno, - _("Unable to remove stale pidfile %s"), - pidfile); - } - } virErrorRestore(&orig_err); } =20 --=20 2.24.1