Received: by 10.223.185.116 with SMTP id b49csp432855wrg; Sat, 10 Feb 2018 10:14:55 -0800 (PST) X-Google-Smtp-Source: AH8x226HVCRo64qmiPIh75xd0WlcsIfgueU6Y+L+haF8ulqORyq+b4Oj3xyK/UxvEyFdtt5my8uU X-Received: by 10.98.11.201 with SMTP id 70mr6650589pfl.16.1518286494953; Sat, 10 Feb 2018 10:14:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518286494; cv=none; d=google.com; s=arc-20160816; b=aufYQs4Uj6IXhnMz9CHm84m32LIY4WVfA52skeUuXP7lZ2CLv3yrI/YSH1M98jaSFh CF+RGH7JI/pZbWnS+p/JfBfPjTaht5toGv5mpycWc1FFg7EVvlmtWtgOb5ngIjvYqnls tSWHqWL9BS2i8t/bT1FD/tUmi7kaWglnp1J4binIhsH00X44A7xOpqk+9X8dnt7zCF/P 4nwOq0HSa0nwcc1QdZ8AJZQtZkPxccZI2S8HDb+Adl7bF7P9D3TsCMbVzaZC5AoAtfXN pluMqAlxnC2LTJnOMra0tklN1MS1vuOmbpcUF22Y7szT6B7VcAOSBTnzIuNpBK45r6xu NOsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:date:from:message-id :arc-authentication-results; bh=YFnn9ZxZKztxHUWnCTNpnOShqUC6ePgIt6p9JrNzY6s=; b=EzE8s7uguFJ8boopgl0Wq8YCIYQNwv2GykYIQtDddBkMNIc9HiVky/ATkClBzZpi4C JN0tRrB9WhhLg+ZEFZLD8hH6OBuUT017Oj7Vu53ovA760Ge3FyrpBvEUNj5co9ZMTL0z zZ7rzlL0Bg2QDq/aXFCOguJ3AIH+7NV+79vRnJPKUqQPJzzQbnc333N0LffsVV6S7JC8 93MQVthTJUJ19tQAzWJeYGUidVshLcy+ZOBN0Qw9oM1MExK22wl4UEoC32Zylj1APJts SMrKYmzFVBWFsfwkj6r+dIfWpT6gfUz/MYN0t4oRiEp3+4GxOjP81rn0HFoZ2fzDuoi5 mdxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si1133813pgn.210.2018.02.10.10.14.40; Sat, 10 Feb 2018 10:14:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751157AbeBJSOC (ORCPT + 99 others); Sat, 10 Feb 2018 13:14:02 -0500 Received: from mailout1.hostsharing.net ([83.223.95.204]:46961 "EHLO mailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbeBJSOB (ORCPT ); Sat, 10 Feb 2018 13:14:01 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mailout1.hostsharing.net (Postfix) with ESMTPS id 7165F101933E3; Sat, 10 Feb 2018 19:12:42 +0100 (CET) Received: from localhost (6-38-90-81.adsl.cmo.de [81.90.38.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id DC405603E052; Sat, 10 Feb 2018 19:13:58 +0100 (CET) X-Mailbox-Line: From 68feef8bf476ab150e6481b54f1b6f5c401b8e10 Mon Sep 17 00:00:00 2001 Message-Id: <68feef8bf476ab150e6481b54f1b6f5c401b8e10.1518286105.git.lukas@wunner.de> From: Lukas Wunner Date: Sat, 10 Feb 2018 19:13:58 +0100 Subject: [PATCH] PM / runtime: Update links_count also if !CONFIG_SRCU To: Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit baa8809f6097 ("PM / runtime: Optimize the use of device links") added an invocation of pm_runtime_drop_link() to __device_link_del(). However there are two variants of that function, one for CONFIG_SRCU and another for !CONFIG_SRCU, and the commit only modified the former. Fixes: baa8809f6097 ("PM / runtime: Optimize the use of device links") Cc: stable@vger.kernel.org # v4.10+ Cc: Rafael J. Wysocki Signed-off-by: Lukas Wunner --- drivers/base/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/base/core.c b/drivers/base/core.c index b2261f92f2f1..5847364f25d9 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -310,6 +310,9 @@ static void __device_link_del(struct device_link *link) dev_info(link->consumer, "Dropping the link to %s\n", dev_name(link->supplier)); + if (link->flags & DL_FLAG_PM_RUNTIME) + pm_runtime_drop_link(link->consumer); + list_del(&link->s_node); list_del(&link->c_node); device_link_free(link); -- 2.15.1