From patchwork Fri Nov 22 10:52:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180025 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp64503ilf; Fri, 22 Nov 2019 03:14:43 -0800 (PST) X-Google-Smtp-Source: APXvYqx4BjqaKm2kZr2BRKhf8UEFCY4znt8Fg1VEJQ3+Z8UXQtJPjP7z9HEoQn5li4tdXXwArJpv X-Received: by 2002:a17:906:d143:: with SMTP id br3mr21349634ejb.215.1574421283205; Fri, 22 Nov 2019 03:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421283; cv=none; d=google.com; s=arc-20160816; b=X+67ETqlCZ0b03QkWFSeF7yUCxRonJZcyKIY21n2dxJOxBorwA2rMoGqXX+Xu05LKp sGlmHhM39UwbG/ybVNpjMB/oNk/exvlqhNVENVSYVlyb8Od7Kjp7kZ81d2p7W7jSFjBm yfcLLL7g8Ih4tDExRe1axGNwM4NhXJQGHUCMNRIRlEEbtGlit/W7u1ZfXCgyBOu470vK pIrLkngmEHRuCE6RT1B9aGZlrJ/zTjwb/stHFhqjOp813dZkXl5zTi1kNLVwCdAvHDND YFjBrQJA3JbW1oBK6NIEkksXsw9QETkmhlGUdYKxcC945yhSM9KG8sKF+z9i1V+Q0R0l nNnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=UWRbO2P7g4EPCMmLRyVjfEAuVW+/g1Ubr25lGtwVdcY=; b=wL20f7Cgo+bDj73yjDlGiGh8IOAMrSDyCti4NkZx1hcUzULHkGPcTxE5RYBguLoiC1 9gb5IBS83/5Rz5NDdf3WIoBT7dOeBeb+z2NWvNXLdpOYpjSIDJfCaBpNXMwKMH4qw4Ko A/bEj/AwuYC0Lqy44Y7SdO3JMaO+zS+kuDAOGE7mk8o1AfEGQ0Yfpr+CiJ7btVdA2VcN jGClteLq4pP41LHXf9I7McgHxAW7Nh3PzXBvRt/jLrS2UQHyBIvg1XGOdnGWI8ajykEH UpOJJ57fzIscp4AS0tbefYxvZdYpbpR3xXMvolnDFN4K597u5Bfz6pkuCDgkC/NkmP2m p8OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Cai/XqnF"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce3si5005378edb.441.2019.11.22.03.14.43; Fri, 22 Nov 2019 03:14:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Cai/XqnF"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727389AbfKVLOm (ORCPT + 15 others); Fri, 22 Nov 2019 06:14:42 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44833 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730198AbfKVKxZ (ORCPT ); Fri, 22 Nov 2019 05:53:25 -0500 Received: by mail-wr1-f67.google.com with SMTP id i12so8000613wrn.11 for ; Fri, 22 Nov 2019 02:53:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UWRbO2P7g4EPCMmLRyVjfEAuVW+/g1Ubr25lGtwVdcY=; b=Cai/XqnFpfDfQNxuq4Sbc1zSdxUypMQRCg4hK26gmubGgp0tJKrZSKUovvrpcPVnQK /XcE6XLsXVZD8qyArZ4RgEHlpfbHIGmx13F3sJAIcK/6/LUWiUObUIW0Re1E4APtCPCq N2hbyupaOgnPTYaF1oZhdoQXVORkMUgs2HWW15gxbwLHT20U9I6Cyz3DT3Zdhl8479lO quDQPUxr8r69FRA5xKzbO5Dg2fAedLiL7hQpNf+4Y4GuJ4MF2VcwRDpycaidVZyYfSyv Xi4GHuMn7psL6twuTrwj62S5zIDtNMX+l9yrNaGSDZpsJHaI9Id12DO9IdJWldA7rYLe 5a5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UWRbO2P7g4EPCMmLRyVjfEAuVW+/g1Ubr25lGtwVdcY=; b=Gsieg1NXivPxa30U+uoR537GUfJDaevaZRPl4bg+mwISuY2mzeWqK8oFrpNOH4nAbG NrxnE8Qq12vSOazXuNC/qT5mxMF9MG3t9lDEl3VXlwb0PjpvAPRUhwzJAI6/dhIkt/F/ v6BeyP7/gDDXYt8i5S/rKUCJ8EaZshQBppxDjwbEB+TK3WdR/xYt+jdhqTcMZIi4V3y4 K+fqu8uXGjI8z3/23xTcqi4JoZbJNktJNvoClUVB9Ste5xRxHEeVutIssqNefV78RBgf 4XkTfyC6j5IG5xgjuvvU7eSKoWgXNsQdGm9h7xj3p0d1BTwCLnQSu0r0py1DW11n92CZ DHiQ== X-Gm-Message-State: APjAAAVKyOSevjjEQP7ZtEJMWqUq0FAEprfYUMjbllkvhrTq2Vu65prs 1od0gBwK+6h7BV7Sn8TUrR8eaQ== X-Received: by 2002:adf:da52:: with SMTP id r18mr17065698wrl.167.1574420002947; Fri, 22 Nov 2019 02:53:22 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:22 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 1/8] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Fri, 22 Nov 2019 10:52:46 +0000 Message-Id: <20191122105253.11375-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chester Lin [ Upstream commit 1d31999cf04c21709f72ceb17e65b54a401330da ] adjust_lowmem_bounds() checks every memblocks in order to find the boundary between lowmem and highmem. However some memblocks could be marked as NOMAP so they are not used by kernel, which should be skipped while calculating the boundary. Signed-off-by: Chester Lin Reviewed-by: Mike Rapoport Signed-off-by: Russell King Signed-off-by: Lee Jones --- arch/arm/mm/mmu.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.24.0 diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 241bf898adf5..7edc6c3f4bd9 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1188,6 +1188,9 @@ void __init adjust_lowmem_bounds(void) phys_addr_t block_start = reg->base; phys_addr_t block_end = reg->base + reg->size; + if (memblock_is_nomap(reg)) + continue; + if (reg->base < vmalloc_limit) { if (block_end > lowmem_limit) /* From patchwork Fri Nov 22 10:52:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179996 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36738ilf; Fri, 22 Nov 2019 02:53:30 -0800 (PST) X-Google-Smtp-Source: APXvYqx3aas8J3mZ/XB5+zUbA2NDyq+digXWIFlnXdalJ/v47uMOwgwbmLsvXNsbusV60Uk0hxR4 X-Received: by 2002:a50:ac14:: with SMTP id v20mr262737edc.291.1574420010615; Fri, 22 Nov 2019 02:53:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420010; cv=none; d=google.com; s=arc-20160816; b=ZgSwxeATouHPNApcc5vFHGqvh9aR1Z84kEPgRw4FifnPITnEqIv40JWrfQqkrwDdMv 0NJxfD+89sqOx5gU0Vk5BiUX3f7zsLviGj/eMqlyJ6fUl45HvsWdR33DTBeOfHMrDfqt 0I89J0qDiN4TvxUYM4OuQNM2qdM5SLrUA9ukkQBwk9Xfwa17mpzPeKGhpTjY0sgtUJHG jleM6dpdMYBTpMpcS8KxpIVcsjqKtbvpHmM69dQm35kbnJfcIK976JE/8FkyEy52HQX2 Mni9RDl2LY9mRtIqOjpRVHbay8lAL9zcUoCGKGOsdgLUr8sy236/USkI68AM7VWrIbD+ 9QnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Ul0WaU2BK0FC/8xcRvsdqtFzsbZwWd8yC4dUM4MnqUo=; b=0x8vcZ2fqm3dgKIev+TDZkaNqcHZmJBSdqUq8VPx1F38zyRO+g007gB96GDZxh1/m4 UVAGzxuEoq/ck7MnwneEOvUC/x5ha4UQpa4QRBAEKMSRJidaNhzWMCK7LKI2GxIQ7dMY LT5E50dBCxroEHd9t3r0A5obatB8nyc/c2lZYLncieMfmYv4C89kE/cQloJ9P5fiv3OI OYDEoluHDvbnFSH8LP/ROHQxMo8aGrJk2HqvJsSryq/YC/pSbMKb43oCLV7XLd0a2RJq /llsfPOGQO8o66WT0NFH0fIscoiyJ7rN3ImaeUnxxTPmS2EWTrgKJMmL+U6+qeWy1+09 eA+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NxKGbMgL; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c25si3893310eja.24.2019.11.22.02.53.30; Fri, 22 Nov 2019 02:53:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NxKGbMgL; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729586AbfKVKx0 (ORCPT + 15 others); Fri, 22 Nov 2019 05:53:26 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:32789 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730199AbfKVKxZ (ORCPT ); Fri, 22 Nov 2019 05:53:25 -0500 Received: by mail-wr1-f66.google.com with SMTP id w9so8110495wrr.0 for ; Fri, 22 Nov 2019 02:53:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Ul0WaU2BK0FC/8xcRvsdqtFzsbZwWd8yC4dUM4MnqUo=; b=NxKGbMgLVY7JIz0WHXsGToHLPqRSiYf69i1BBk68y2HSWqdwEOntuXqiuq4NSLutJs Rm7jEAAAOXNQzNBhab4roJ68ZEb3PCayuRycIQF30YBgSrNO/EevE1kAGOJ+RWD42EkK gfSRIJmGgxgzObWn4eM6yjnPgF2t3aFI3+ylF6GDjt+zmbAEHDvIB3YBdUwNkDrMukZK jJXYUG96FkegwJ/cDi/tn4/0yOCdm1Wy7mV1x8GnVoEJvlBy0VcDOKzuDNtywApjFx7a hiD8QcZnUxQCSPIEWlRrI9fbbYhANbbeJvx6i9onjWvSiZXn88fgKgQFX763P+kTEnJP artA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ul0WaU2BK0FC/8xcRvsdqtFzsbZwWd8yC4dUM4MnqUo=; b=sSNgUn3hTHgc09YfTQIgZaEIsYi84AyGQRjeKBaKlnKBsFnG9/L6vmaDG3AgkBCAW+ 9myeewFMvrlGPb+zfdj2Napws1Uz2rb6m9ek00bdnzDtbQT1EBcBJPFFEWjw+O0yyVH3 lbUBXFSjlQipdwJzAmmSt5O+/tdEJkqdJCa7zw8SDHpCr24/44kR6dEMd2+UKEKI2pWd +vqf7K2DpqTzb7kL93iv0tuBxEGWqXiL83pJotcb2DGfK6LKkq5sLPfENBtwduUoASd7 4M/66Nzr/vSILB3QzMQ76iFOoZRc3sDcsH+Nfje+feQV9y9jduXCq0LVX2U+5rX2iB9A EI0Q== X-Gm-Message-State: APjAAAUfVIvYInXx30maDD3QvlgOEH12cMAMQzF2vUKsOpwQvxVNsFF1 sNkwguE5xbHQ9HS1/GSRxHj6CA== X-Received: by 2002:a5d:6542:: with SMTP id z2mr17582539wrv.371.1574420003607; Fri, 22 Nov 2019 02:53:23 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:23 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 2/8] can: dev: can_dellink(): remove return at end of void function Date: Fri, 22 Nov 2019 10:52:47 +0000 Message-Id: <20191122105253.11375-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105253.11375-1-lee.jones@linaro.org> References: <20191122105253.11375-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Kleine-Budde [ Upstream commit d36673f5918c8fd3533f7c0d4bac041baf39c7bb ] This patch remove the return at the end of the void function can_dellink(). Signed-off-by: Marc Kleine-Budde Signed-off-by: Lee Jones --- drivers/net/can/dev.c | 1 - 1 file changed, 1 deletion(-) -- 2.24.0 diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index ffc5467a1ec2..1b3d7ec3462c 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -1071,7 +1071,6 @@ static int can_newlink(struct net *src_net, struct net_device *dev, static void can_dellink(struct net_device *dev, struct list_head *head) { - return; } static struct rtnl_link_ops can_link_ops __read_mostly = { From patchwork Fri Nov 22 10:52:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179998 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36795ilf; Fri, 22 Nov 2019 02:53:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzsgXSH8zQtZPLB3viqGsb2Dq6lG9THBsAY1ZqZHwbV/qQApWjkdIhSkBcfKtvwRCR7sWwh X-Received: by 2002:a50:a7a1:: with SMTP id i30mr258866edc.94.1574420013028; Fri, 22 Nov 2019 02:53:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420013; cv=none; d=google.com; s=arc-20160816; b=M0gMftdGWUKE/qFWWgoBVj7MODZ/68kp2Erd3yL6Rg7Z9xKtQAzXKsH1ebL/0XZQZp +vPdJMqygsNFM/Ruv9tBAziWwJHUS/GxJkWIkLfTQFHZH+IENGfiL0ppR/lXwRDEejeg 0Fhq91SWsAzf67CqqV6C0qDP7GHhHVVcU1ck5Ki9VTgiaOL05uFvwCsq2t1vJjtCGHU2 wgCC+xz/l2oK6pA/hO31YW4zkw4dC0NzwsGFAr+K/hzSWqokrRfGuRlE5tesUGsKDMHv eoKxrnuLtOeCOTepkaraK/+aLlBwC2y2xO5S3dda/Xw2jm4+0FLUqxJ18sKXpzCWRMJC 2Tzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=aMdmhI1a3eYH/WVtmSydJcMj1XByvjyqY+PnBFpibbM=; b=tYhOJrvQyuMW3xicsoIH5Ew2FKIQD7ST7yV0rAtIZbQBbtk08/bzTWzzkaMoV/iTZa 28gPBgBxFTepsgAxOeyYnopT9F9X3xkso0KtBE9VkGCfBiw3Lk+j1C+ZIXe4qDosz9to /J6IT/DBrhGx1gZnKkAqY/fMQZHFXmGs4QWQJ9ymIyysj3EGNM9Df5lpjEyoLWv/65LL XBh6+kZ5TGkYlNVYp/G4ISybYKXEeE0GOKtXe7l9cSG3dYas2GhhNQ+RE2cjrFY3asM3 ZMFFFlBpiFkeHy0oQBbxzlXXQFVhL4An20En2qcr5FdhzTIEAQUNt63PlF3DWtouFjua M60Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mfwsxBmQ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c25si3893310eja.24.2019.11.22.02.53.32; Fri, 22 Nov 2019 02:53:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mfwsxBmQ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730206AbfKVKxb (ORCPT + 15 others); Fri, 22 Nov 2019 05:53:31 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:32793 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730202AbfKVKx0 (ORCPT ); Fri, 22 Nov 2019 05:53:26 -0500 Received: by mail-wr1-f66.google.com with SMTP id w9so8110562wrr.0 for ; Fri, 22 Nov 2019 02:53:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=aMdmhI1a3eYH/WVtmSydJcMj1XByvjyqY+PnBFpibbM=; b=mfwsxBmQFTpr3EA9Pzd4t4wXa0DuQaLEcu4cAf1f2rKo4N83Q0zZQAg5N+7sf8XM+F XizUehbATtWhsiqI0fxc8svRBPxWFqC9qb7q4X9BEoKYkjgIryp1YfzQSXoIFlsKrMRV UNvnIYlcIT9jnGM9DP5Y7r8GREAR3vN7XSKkpyyBNVwvzMK8a1TLWyUNbtmCZ6He5XJz 16OJkz7yDUiT40fgz3kAwN0zRpE2MB96fYiGoXFa8msjLFzd9jblkU7SeoOiDcXaSsvo NvHQsRdFZht/2xlDF0qxWa3KhWrekbyFVjPoI6mpA9uh9TTmMr/1fdMil6D9HQBGPunY b2BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aMdmhI1a3eYH/WVtmSydJcMj1XByvjyqY+PnBFpibbM=; b=C6hH50dj6EeuNOY0dOqZ4W9oFaVshAt+GFn82AcwkizMl/YNplTDDOuMolaSqH6mI9 KxfwhDcbb3bC4GsNIZF+wBiw1Dz5tLD/D0PVqU81xoY3WomFxeU8sT27Wk+3GOaBOKSl TBfXKhUEiccNGQT1PengpOpUGI1KaTs0TLCb+QEd98IXaLccJ3vOPZqcSrpel5XzoOn5 1mMVldjdnLPL7iRkWfZrXILIQ3ooW2e6B2ag6FFoDLoyeB4RMytaGnH8nGc790uQnZ8P HRk5c0yxKR4/qyUg1ASmvlPsxlARS+ZMEA/gtlqRx4vz3BR0rdjW3+bJyUzgeVr6YhCU TCXA== X-Gm-Message-State: APjAAAVll6rMQ7v2nqT3ElbzzyBtxi6g/OLpdWKTYXFeCcISbwIsnkQz kCfJ1T8HPYkq0Jw31rcGXwgtPqxdepM= X-Received: by 2002:adf:8426:: with SMTP id 35mr15476380wrf.262.1574420004672; Fri, 22 Nov 2019 02:53:24 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:24 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 3/8] arm64: fix for bad_mode() handler to always result in panic Date: Fri, 22 Nov 2019 10:52:48 +0000 Message-Id: <20191122105253.11375-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105253.11375-1-lee.jones@linaro.org> References: <20191122105253.11375-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hari Vyas [ Upstream commit e4ba15debcfd27f60d43da940a58108783bff2a6 ] The bad_mode() handler is called if we encounter an uunknown exception, with the expectation that the subsequent call to panic() will halt the system. Unfortunately, if the exception calling bad_mode() is taken from EL0, then the call to die() can end up killing the current user task and calling schedule() instead of falling through to panic(). Remove the die() call altogether, since we really want to bring down the machine in this "impossible" case. Signed-off-by: Hari Vyas Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Lee Jones --- arch/arm64/kernel/traps.c | 1 - 1 file changed, 1 deletion(-) -- 2.24.0 diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 28bef94cf792..5962badb3346 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -611,7 +611,6 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) handler[reason], smp_processor_id(), esr, esr_get_class_string(esr)); - die("Oops - bad mode", regs, 0); local_irq_disable(); panic("bad mode"); } From patchwork Fri Nov 22 10:52:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 179997 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36776ilf; Fri, 22 Nov 2019 02:53:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzP3ePuQsQXIg7x5o6m4WFS6On0sudNBMN4MWmmg4x+2zxtSaN/l2NtIOpOk78SVrVwjt+u X-Received: by 2002:a17:906:cc93:: with SMTP id oq19mr21501059ejb.316.1574420012193; Fri, 22 Nov 2019 02:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420012; cv=none; d=google.com; s=arc-20160816; b=RTOQp9Lyd0IHNdo8TYtox7FeZ8s9Gif/8D2wH01vol4hrlcRYVHtDqITVIFZh3/Vag UVuzy1gBZOtXI2GzTYk/TuGN0cBvi7MiK7AwtIWnd7X/v/iTl2YvSAVaam2nvZkFyej7 MIszpRyQNirQkqXPHmC8ZYH94CkuTBFMDycE0/qRAYe0mRd19XYDIFmoe1eWD4KWMnSM bXXRXcWrHbDTSf3/VMNdVzx8ElNZghmq/ADRdYfbt5GBL5/ZQtQ60g5FvaZAnJAu7NX3 cM1WheumtMrwJAZSxiJHrU6k0Wd4miYTMk9sFohLgGfrB5gnIJG0Gr7jugh4xny8ReXt /IqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PNM5lccoBtUfm9iFogx92X5PMCn4g3/BVdMdr/P978Y=; b=D2GQIrsxbtdwhZl5z1c6UlRU75Yaz+ib/uByzhsG0Hnh8RxmWvhJ1lPnAGuI1goXQd 1EyPiVi1uDnpgNCPfLEO2nWrFWm96g6HCNDToqbQaDICHW8/ZYZlmHNq3YI3KrcST7re DefCIpcrPJxfA57PBti95By7I5qQm26dJLl2Xh/+frBpGyye+dVQNZ76ZRbkeqlQ7tfd nMAyel6jqZYpnjDGSnzq6aepIGziTQtiNUc3Av5YODNWN3PklhtAAQhWD7hJfsTS56oO P3G9IUoi8b1w4VD71eWwnr4kUywVAXqIG1XX8liH/WrR2Qaj3fAu+2DohNOnn9VTDC+Y VxKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tux3SSPu; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c25si3893310eja.24.2019.11.22.02.53.32; Fri, 22 Nov 2019 02:53:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tux3SSPu; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729970AbfKVKxb (ORCPT + 15 others); Fri, 22 Nov 2019 05:53:31 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40804 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730206AbfKVKx1 (ORCPT ); Fri, 22 Nov 2019 05:53:27 -0500 Received: by mail-wr1-f67.google.com with SMTP id 4so4734649wro.7 for ; Fri, 22 Nov 2019 02:53:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PNM5lccoBtUfm9iFogx92X5PMCn4g3/BVdMdr/P978Y=; b=tux3SSPuh61SEjBLSCOgxDUMtLXrokKpBYuA5SeC4hYQHhnAuaiO9mOOKAM1MMqxTZ TW0+3T2Gg+9sL6joIRKeEZl2DOKx0tPW4O2G1IxK13WWBnlhIqOaKLOtW4POBLOtqyb6 b1T9vmNUZSqxLIUkvvg0DoHBnJMs8KRlIdRsDlatwVtulgv9X2Lf63/PGGLaHTTIADpz ZEUNs/sQjTONDfIWR6yfKsvj60whpSaHSaKZ+dy+HlzLn7f60HVosrjdvdyeKLQlXela vzKpX0IvRa5Sxdyxokum6c7ysww+TahF1Z5lwyd2R/aH2rQP7hWmqOrsaNtN1TyStxZh 1slw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PNM5lccoBtUfm9iFogx92X5PMCn4g3/BVdMdr/P978Y=; b=LWfUFr2oLUsNRSr3K4dZQ5E557DJ2pYmM0K3YkAqpWv3MQjT4n08gy6L+a3QFY2/fE Rcb6cdPYvonzgW9avEwjAEpifkBsF/5i/S76udo7kL5rXHDFujpwzm3uRuhneWRbgZyB /gd8XfcnQ55vp8DwSjB8g59AsoukgZN+VFdjYtOYqXCpB73a5pSwzyTm7qu5bOdY2nhw SajbVDqDOmdj5mIh9WawmEnmPvGUperjYMCTRu2dMWajkYnFX4OexaTR3jtTz0UeJJm5 oz+JxznWKDDzCM39XbaeYKck60l+4byl+BM06UfGo2lOWepZx5eX0Clenqi3O9swKDGv SnfQ== X-Gm-Message-State: APjAAAWNqJwJBJwCww4QpUYhPYIiEx6wklJhWyid8dwhvmMeXNCQLpmh t88LC1byQqZ7JXKElmK6k62cQQ== X-Received: by 2002:a05:6000:104:: with SMTP id o4mr16469149wrx.309.1574420005608; Fri, 22 Nov 2019 02:53:25 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:25 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 4/8] cpufreq: Skip cpufreq resume if it's not suspended Date: Fri, 22 Nov 2019 10:52:49 +0000 Message-Id: <20191122105253.11375-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105253.11375-1-lee.jones@linaro.org> References: <20191122105253.11375-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bo Yan [ Upstream commit 703cbaa601ff3fb554d1246c336ba727cc083ea0 ] cpufreq_resume can be called even without preceding cpufreq_suspend. This can happen in following scenario: suspend_devices_and_enter --> dpm_suspend_start --> dpm_prepare --> device_prepare : this function errors out --> dpm_suspend: this is skipped due to dpm_prepare failure this means cpufreq_suspend is skipped over --> goto Recover_platform, due to previous error --> goto Resume_devices --> dpm_resume_end --> dpm_resume --> cpufreq_resume In case schedutil is used as frequency governor, cpufreq_resume will eventually call sugov_start, which does following: memset(sg_cpu, 0, sizeof(*sg_cpu)); .... This effectively erases function pointer for frequency update, causing crash later on. The function pointer would have been set correctly if subsequent cpufreq_add_update_util_hook runs successfully, but that function returns earlier because cpufreq_suspend was not called: if (WARN_ON(per_cpu(cpufreq_update_util_data, cpu))) return; The fix is to check cpufreq_suspended first, if it's false, that means cpufreq_suspend was not called in the first place, so do not resume cpufreq. Signed-off-by: Bo Yan Acked-by: Viresh Kumar [ rjw: Dropped printing a message ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Lee Jones --- drivers/cpufreq/cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.24.0 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index d43cd983a7ec..04101a6dc7f5 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1646,6 +1646,9 @@ void cpufreq_resume(void) if (!cpufreq_driver) return; + if (unlikely(!cpufreq_suspended)) + return; + cpufreq_suspended = false; if (!has_target() && !cpufreq_driver->resume) From patchwork Fri Nov 22 10:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180024 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp64470ilf; Fri, 22 Nov 2019 03:14:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxpYI/7n4LixGyEeKV15KG4BQYpMUjrOuo0fQtj1ICxa3KYqHE+ZkpeghLbMKN4uKU8sFib X-Received: by 2002:a17:906:1d02:: with SMTP id n2mr21219159ejh.219.1574421281073; Fri, 22 Nov 2019 03:14:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421281; cv=none; d=google.com; s=arc-20160816; b=FqcJ3h9Y00f0bTcknTW6j4YwSWtRbKcXNHcYXntYAn7K4yroU28n9Ti7KfWlrBpSIl 50Kfj9euXZ0PnPiDec4396mU268BLtIEXt2Rd/woSDdgJWyZUkJXn7y4ROmP5eivTM7H rLrrZj3dX23gHIyuT1WJ8QQXFU2tenVil3lOIgsNbSjKfskFu7W/f50VIOEdTDgSYlKj 0fLB+3oTGyrZq6cstOT4yASnq5J8/rGfO471tV+VEVBbV7CzzdIak3n2kfJjy0AwLyBd KKWuDhRl3De+Wm3aRKBkRzXn6vxaYo4UzqgUcIyL/h18KW61u+jzXUwGiQmjDxrwHrJ4 nl2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=7eQ77p+yZoA07vPJ5MQhHwgPGskB4qfhyE5XsEtx6sE=; b=BDMPvGRT1831Fe0Q9nBHYYa3ERIUxXPJZUI3FVFJt2rqQ7/eX9aQ+oUGkcDwMdhPIi Gjj1IG72i7/B35D4xAv6Qy9VA/73c8LUZT0nUJMv0uLtjb4oZxdxr0f5QNRKcb6k0FvG akGxFmCz6TgLAUN4Kto8zQM59iNme6R0W7iDxTDvDCojE45xgWAoK2MgH8bzyNuA4WnV PuAdqYG0hPrJLh4aYgBRQSRMgjjm4BCWmdOKM52GSumbrcXZJQ8ERZjgq2pWjaxY2ra1 /XDtL/agEKGpdLmuEeksk1cTL4zFcGK3gpemoQX8O0iYQRuSRgGTnx5PAGfONbPP4Sep lhrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=his3mcjn; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce3si5005378edb.441.2019.11.22.03.14.40; Fri, 22 Nov 2019 03:14:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=his3mcjn; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730431AbfKVLOg (ORCPT + 15 others); Fri, 22 Nov 2019 06:14:36 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34057 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727890AbfKVKx3 (ORCPT ); Fri, 22 Nov 2019 05:53:29 -0500 Received: by mail-wm1-f66.google.com with SMTP id j18so9950944wmk.1 for ; Fri, 22 Nov 2019 02:53:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7eQ77p+yZoA07vPJ5MQhHwgPGskB4qfhyE5XsEtx6sE=; b=his3mcjnfWoBpqB2zVQxlSl8g0l8Wx1tuGrDrGxy54p0d5QN1DRbW768D9pe7ifTba PM4qEQ98qx9/qRxJz65ZMDowBTAF4Gyy605grLq8F4li20M6QlZCINDWhjOzq0SdR44G TZbKOrlqWLKgdLLeIq6Lt7yO6VLPGcLlDpZLnkxaxKukjckK6nR6uf9DNbpHCyJUSWTU txBZji6jk6ozACvcK6upKCIFg3XwIhWllnRSm/kWX+WUUaoHwHNS/JHaTiYv2AzAd81v YDeB0ydCR5OmkI5SLcWMLD/XDUXpyEyzHapMInbTkgKNff1/S2Rz01v26Ks9VWEZARnD VJng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7eQ77p+yZoA07vPJ5MQhHwgPGskB4qfhyE5XsEtx6sE=; b=ajF46L01l5yZnT2Y+FYZxYqw6QXZbCQNEvH8eSleL0Dz1mrz3eoITFO9IeREsCQ8W2 Soh7aqqC6UrYUnNUAkkNsYZquuF3V48P0D2ZR8Y5lAWZwWoghv7wAhZZXxFxn3gx/G6J CXwM+nHOiZz5YhM5eh40aiJ7JigalId86DfRDKlpvi7a39j9kn3/pBXnkbacwfa22PUY EjkvrIwzd4uFJ1cgugiZBCCygOz4D6ucm/kH21euRV2LOVEVAAhvv35VGe4tPDLXcO9G V+zzABOr2sXdVvR3MKqSNMnb1gPtQ9c7yOnhNUusEnu+lzxVw1aIm7kLhajoBOtmF6hm 4nbw== X-Gm-Message-State: APjAAAWnp3tFyD0pFpqIlweIQZ/koH29vJXkt+J8d2cfO3h3J0mc1q75 VajuWeUdWxldwvzeD1Gbb+B2uPjqUpE= X-Received: by 2002:a1c:a347:: with SMTP id m68mr504530wme.129.1574420008411; Fri, 22 Nov 2019 02:53:28 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:27 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 5/8] bcache: silence static checker warning Date: Fri, 22 Nov 2019 10:52:50 +0000 Message-Id: <20191122105253.11375-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105253.11375-1-lee.jones@linaro.org> References: <20191122105253.11375-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dan Carpenter [ Upstream commit da22f0eea555baf9b0a84b52afe56db2052cfe8d ] In olden times, closure_return() used to have a hidden return built in. We removed the hidden return but forgot to add a new return here. If "c" were NULL we would oops on the next line, but fortunately "c" is never NULL. Let's just remove the if statement. Signed-off-by: Dan Carpenter Reviewed-by: Coly Li Signed-off-by: Jens Axboe Signed-off-by: Lee Jones --- drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) -- 2.24.0 diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index c5bc3e5e921e..3e113be966fe 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1397,9 +1397,6 @@ static void cache_set_flush(struct closure *cl) struct btree *b; unsigned i; - if (!c) - closure_return(cl); - bch_cache_accounting_destroy(&c->accounting); kobject_put(&c->internal); From patchwork Fri Nov 22 10:52:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180023 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp64270ilf; Fri, 22 Nov 2019 03:14:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwqxFxXJZnmEB1H2Vz+8ctcguTzeZEQiVyBiXYjey/1slDcmA/yKepOgEf2lg5bINdCHP30 X-Received: by 2002:a17:906:1ed7:: with SMTP id m23mr21098019ejj.326.1574421271397; Fri, 22 Nov 2019 03:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421271; cv=none; d=google.com; s=arc-20160816; b=fg41vFNEP+WwN/FwyeeW6Ro+6UcFy86lWOuTIgkeqE9j02uuKu9bebxz8wtnSMrjUK un6BVLBtsegGSEL49i8bchWzOb2yPs0Y3HSJJoUBzbwlndtQ4d2bJPdkS3gOGNs9GB5P U5WMXmnjkUf7SGLXJZwQKAGRWHEg1bwX91R7Nu9oT3kvcKpwAlELcs9+NAgzDXdP34ta O+7YPP/c9sgLe0oxQphTbLCjlWiOjmpSXsLBuMwB53hzN/Xsyrja0ed0DpHFN3Ia48wS FuF+E684/D8dixL9iXruoUiCS9qHxvu0bUB0FD77U82j3n7hLDR5CQjnLrF2/gl3O4ba Qs7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=EwOfwwiNckMuQzPVj8mAR4X16hKKAPeuk3yKLlec5YI=; b=E9QmQAUJhFojVIBQWJqJRsxxh8jbz6l7NNCjeaoXpphNaYtz0imbMzKnR1QEaJakWO x9HBFjiAe5Z+x4pXqlYGF0l+MYdgRz+FbFSFH5QWWPKzhvASc/etCOX2XK2/7KRSge51 ndvZdy9LPdFCkUS1znSbmOdIxp1EW/B6q05h4F3ZTXvNp0JGSTS1MltcL0ME6YrmcSGq et4IjF0z8D2d4DnOXEEpO4/7lAr5zhR+308NoYaK+YWJKsCw6Y0JvHV+R2B09uXxhrCq lv0VqWY7fU2cnmVPY0zcc7SqVfx2nCLhihJJTtaG/bCKR1yC+Za5uKjjmH3m0juiiLjD ZAXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XFjik6/1"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h58si2037450eda.18.2019.11.22.03.14.30; Fri, 22 Nov 2019 03:14:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XFjik6/1"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730216AbfKVKxc (ORCPT + 15 others); Fri, 22 Nov 2019 05:53:32 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40975 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730212AbfKVKxc (ORCPT ); Fri, 22 Nov 2019 05:53:32 -0500 Received: by mail-wr1-f65.google.com with SMTP id b18so8033910wrj.8 for ; Fri, 22 Nov 2019 02:53:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=EwOfwwiNckMuQzPVj8mAR4X16hKKAPeuk3yKLlec5YI=; b=XFjik6/1F5q/FGsLPzqx/WRNDDqb1Faj6Ianja2u99UxfAsl/WnAdQ9xhIVH6MzGTF JLUl3+TddRPpfgV04UK8uMETkYrgrayOWSWFbQKXbXVgKlVzYODlLllbDIn5pHI7c9oe sOkNvkge+4WwSw4pgriiWN1Rk15xZ3wdRt4XyhEwFtBOY+XFdDZckS2E4p2vjuVRwAWo 7UwIPECGHAif1f/3TuIlc/le5fA12pp+K2GM4xE3he/uEyb/K7+96osTjuA/Gvo6WRQf er/JgLv0JbJVUIG3fw8rEd+wyu22zefI9IWY5UGCH2McjnIWPfUqZQYxKtFoD/hg/CXx uEPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EwOfwwiNckMuQzPVj8mAR4X16hKKAPeuk3yKLlec5YI=; b=KHg//EYXlU6WvjYWZLyEDTyMvB71R4SwueVY7POuf2qv3GBHbPvn+OpFBsgnJqq6ka 5viGqQCFWmDf1+v3LO1QR69GK/8z7dDEAMG5Wjk/J4xC6Y/srN0pz2REg0L9KbtlSVAm zYI8hLH7oVzAjj9lhrs4C04wrt/hhLG1hOi6O8/d2shF+Tyj5AElSRJ5+q9NjFQSqfDJ TuzIO49kg7JeTqZ0ygZHkIg9IQpBBnhTkB+V7o/ngBeNVUOwReVRXAncLJx11ZzDjPE9 jL3RwEIaGaecHSVICT5HxCQbNKNmzyGXS9EecM7ocF7FwPeP/I+l975tspQWXocknykt 8Tpw== X-Gm-Message-State: APjAAAW8EjVJKWpHMvlGJDJjZfKmtJyWNTF9gKog8mY5F9XVHcVfBKMc bX5xtc+Rnj8N+9oX4KGx71/l/wkY+HM= X-Received: by 2002:a5d:4946:: with SMTP id r6mr9412090wrs.155.1574420010516; Fri, 22 Nov 2019 02:53:30 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:29 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 6/8] dm: use blk_set_queue_dying() in __dm_destroy() Date: Fri, 22 Nov 2019 10:52:51 +0000 Message-Id: <20191122105253.11375-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105253.11375-1-lee.jones@linaro.org> References: <20191122105253.11375-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bart Van Assche [ Upstream commit 2e91c3694181dc500faffec16c5aaa0ac5e15449 ] After QUEUE_FLAG_DYING has been set any code that is waiting in get_request() should be woken up. But to get this behaviour blk_set_queue_dying() must be used instead of only setting QUEUE_FLAG_DYING. Signed-off-by: Bart Van Assche Signed-off-by: Mike Snitzer Signed-off-by: Lee Jones --- drivers/md/dm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.24.0 diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 2ffe7db75acb..36e6221fabab 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1946,9 +1946,7 @@ static void __dm_destroy(struct mapped_device *md, bool wait) set_bit(DMF_FREEING, &md->flags); spin_unlock(&_minor_lock); - spin_lock_irq(q->queue_lock); - queue_flag_set(QUEUE_FLAG_DYING, q); - spin_unlock_irq(q->queue_lock); + blk_set_queue_dying(q); if (dm_request_based(md) && md->kworker_task) kthread_flush_worker(&md->kworker); From patchwork Fri Nov 22 10:52:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180022 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp64241ilf; Fri, 22 Nov 2019 03:14:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwbMRyzm0o0tifDlrAFwcZLmYkHdb9cj1WwsjNCulyIftaYYbCV4EViVRmXNn7cpcJB0uuD X-Received: by 2002:a17:906:4e99:: with SMTP id v25mr21863474eju.106.1574421269984; Fri, 22 Nov 2019 03:14:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421269; cv=none; d=google.com; s=arc-20160816; b=BO7xS3KP0JfiWlYdxPsNNDG6tk0qgCZDggDKB3qFWmBQt8FTek9fXbysy2wqrlKi1a ZyIGlCSeaLH13C/zhLH7tEbUjxK6JTBI55aQigsqeYrE49+KeLfgykssVKtmSJjmQ15X RUc9hiYnYVxEfnE29rrA3ljH7vznQ4CWDpiHAYUjV4jX0N9FhiBSOWKBV1tlr+ycJbXv uJCu1F/N/+2QEdUSZO9Mbpk3zzFrjKQqLOnIB5yQxhiqFoT2WfF1U/+ypZt6dXq64wPg 5uC5BoidFH/cHr5ZW0WgJDSah9nyw9reO4wjiwMWYHHG9nAzfxy3FDSK1hCKv1NiDJ2M 4vzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=c1Oau3Pvqb3kiOGOU8Ip4efQlbsCGfoIa++MtluImhk=; b=hWcZVhkiq+WOWZ6MQ9fqVBNIbzlxn3Aa9Z2W9L6Jq5LoIptUCQ/p84i+i123qZBqVO TeGsn+cuXEC2nD8HiUpfLgdGWaKi18JzFNys5jsJd9r7HbbW3ayulShmxqq3o1UcULJt dnXDSsGGwgbO6nmVnQpEsLrYycFr8U473F5vaJYSBSCIil8eUOxPcq/C6Rxvu3u5Zj5P 1E6cdOXY7KmcoX2fJhzqkH2VnW4JvmcWv9GHbrX3ixntvV0bxSRfj/MHza5/Rya6Y0PC Mc5oRjwqHeeQKuZoHMKuzzyaTZ7AMKdNHcaAtJ4KvN2IbK6vNstFXB0TZlK7/cRDghuy MX2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ymMzJdkf; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h58si2037450eda.18.2019.11.22.03.14.29; Fri, 22 Nov 2019 03:14:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ymMzJdkf; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727974AbfKVLO3 (ORCPT + 15 others); Fri, 22 Nov 2019 06:14:29 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:32823 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730219AbfKVKxe (ORCPT ); Fri, 22 Nov 2019 05:53:34 -0500 Received: by mail-wr1-f66.google.com with SMTP id w9so8111100wrr.0 for ; Fri, 22 Nov 2019 02:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=c1Oau3Pvqb3kiOGOU8Ip4efQlbsCGfoIa++MtluImhk=; b=ymMzJdkffV1JOgkelIDUr/zrANxWOe5wqs5SWPn+jVsvZO/sayhx6QmDE/373U/Ziz +niv8nn3V75IdEHExEetckUtb/a21gg3r2Schvk3tA3DmkK0hvOld50GrFMyYMm2xvzl DHh5jKAjZpLhnZ2Zn3fdYSYbVu+YNpqwihzYG1W5WNl0LZ5ZxcilLvDLoEmbfDq6X8Ud EM5Mz1HmKjzcgipePt40z2nWSlPu9H5d0cNDWFo29yVlyHD+FuO13b7V1qfeO34nsfyI naxRg6k3h9Fd96bGrkZGOEPvW1XqoVSBnVj7jhANhw8vSC+cKEjOa8PpYnM5Ks0BEY6E 2+Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c1Oau3Pvqb3kiOGOU8Ip4efQlbsCGfoIa++MtluImhk=; b=Orxd5Tjj8bDzq442zz/4qZnT8kiO9c+Tb5fpcDg7vWxTSdt6gtF3g+IRoMvFITme7T jz2W6FGscvQZ6jreBv5J8iG0/GqKMza+wTvvMOdi2RTaEE8P/bC6VuGMj8qcIKIBLrCB ScQr2whwpH95zElzqri4QstQKZZcMjZv28uT+LEU0EniWXCdCfIoXSxO5W9xTQ+MiLZm TDsCrQyICjMbteg9gXm0vd/Ug6gC8lfPa/tQ7N7jwkV67CaLXtVfb6uJJpqA7VVBj4Fa 2iWxB2xfdOUZcojuiUKxa3RoPL5RFMYr29kZuhDzAJ1VmYHdG31D2wXCj1mnOuGXkAdq BZjw== X-Gm-Message-State: APjAAAXs0K7u3o2nrvMlBedZXX1vsfN2x4xo8BovI9uXrMXJwUjVa0Rw xkr94WW7uUYEnsq1iUWJKmxRSA== X-Received: by 2002:adf:d1a3:: with SMTP id w3mr18057845wrc.9.1574420012581; Fri, 22 Nov 2019 02:53:32 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:32 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 7/8] ocfs2: remove ocfs2_is_o2cb_active() Date: Fri, 22 Nov 2019 10:52:52 +0000 Message-Id: <20191122105253.11375-7-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105253.11375-1-lee.jones@linaro.org> References: <20191122105253.11375-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Gang He [ Upstream commit a634644751c46238df58bbfe992e30c1668388db ] Remove ocfs2_is_o2cb_active(). We have similar functions to identify which cluster stack is being used via osb->osb_cluster_stack. Secondly, the current implementation of ocfs2_is_o2cb_active() is not totally safe. Based on the design of stackglue, we need to get ocfs2_stack_lock before using ocfs2_stack related data structures, and that active_stack pointer can be NULL in the case of mount failure. Link: http://lkml.kernel.org/r/1495441079-11708-1-git-send-email-ghe@suse.com Signed-off-by: Gang He Reviewed-by: Joseph Qi Reviewed-by: Eric Ren Acked-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Lee Jones --- fs/ocfs2/dlmglue.c | 2 +- fs/ocfs2/stackglue.c | 6 ------ fs/ocfs2/stackglue.h | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) -- 2.24.0 diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 5729d55da67d..2c3e975126b3 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3421,7 +3421,7 @@ static int ocfs2_downconvert_lock(struct ocfs2_super *osb, * we can recover correctly from node failure. Otherwise, we may get * invalid LVB in LKB, but without DLM_SBF_VALNOTVALID being set. */ - if (!ocfs2_is_o2cb_active() && + if (ocfs2_userspace_stack(osb) && lockres->l_ops->flags & LOCK_TYPE_USES_LVB) lvb = 1; diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index 820359096c7a..52c07346bea3 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c @@ -48,12 +48,6 @@ static char ocfs2_hb_ctl_path[OCFS2_MAX_HB_CTL_PATH] = "/sbin/ocfs2_hb_ctl"; */ static struct ocfs2_stack_plugin *active_stack; -inline int ocfs2_is_o2cb_active(void) -{ - return !strcmp(active_stack->sp_name, OCFS2_STACK_PLUGIN_O2CB); -} -EXPORT_SYMBOL_GPL(ocfs2_is_o2cb_active); - static struct ocfs2_stack_plugin *ocfs2_stack_lookup(const char *name) { struct ocfs2_stack_plugin *p; diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h index e3036e1790e8..f2dce10fae54 100644 --- a/fs/ocfs2/stackglue.h +++ b/fs/ocfs2/stackglue.h @@ -298,9 +298,6 @@ void ocfs2_stack_glue_set_max_proto_version(struct ocfs2_protocol_version *max_p int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin); void ocfs2_stack_glue_unregister(struct ocfs2_stack_plugin *plugin); -/* In ocfs2_downconvert_lock(), we need to know which stack we are using */ -int ocfs2_is_o2cb_active(void); - extern struct kset *ocfs2_kset; #endif /* STACKGLUE_H */ From patchwork Fri Nov 22 10:52:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180001 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp36897ilf; Fri, 22 Nov 2019 02:53:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyt0eESsB5h6P30cQ3CWpUIsR1s4DZcZ/xetm7tdVcWkYnQFuxw9ElLzqanhCd69ryUX6hy X-Received: by 2002:a17:906:d71:: with SMTP id s17mr21206960ejh.312.1574420019430; Fri, 22 Nov 2019 02:53:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420019; cv=none; d=google.com; s=arc-20160816; b=yxB5yeqG/JO/ScG2+AUlgd8v+bJL6n9qo0vj7PxFQLJFDy+dXfdGmCNFMPOHsHYqhM 1j+IN4SeaPp7pzrwEXoeefbc9PiKHTtkf33pgRw6MiIJCr+3OvKj/g4OIRw9xX3Eik2f kTHx/DIrz15EziQxHVIWnaD9VCsnSjVxQfpLiUdoIVO9j8CIlUV743OtCWh0SzEL9T8e 4LvUl0Zo0Lnn9eUQ7DLreXubTehDylzXKr5rGsDjIDvdsU4Z/qjtXMmx3bsNlKSRxc2Y kiFVzuon+g14EJWTnvs0WhosNhFSr/0ICga5HltuFp/lsjEHxVyaJXoETpNB/q2ff3vv qNHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=oIIGMhbYISHZGu9r96uoFeZiZpVGd1I91v4mf/cGzkM=; b=zajDGxARGEaH648fbthQ+FMoTaJxNu67iYhYFJ4yn2O3+y2H6kNMec9l8cuN6JClbt LyBxGAxpkLo2AXcT+lSklQdVvd72cOpoi2JFzmzkmlE452a0YnnNKMSHlZImOdWTp0WL LuNxPusNv47AWv7Xhqwk6YmULzgalf0tpwLVJrz20JSY8B0cbkBLEjcQCtsql+RXnYBC aAhVUz0PV+Q1GqTDCKgP8qeYtRAnLZCohkoPfLsUtw4dTCygE8hYx54uSAnLG1On4cqz u7i4Zx7UgEdONTQG3IZ4J5PcDbjt2oWUBhRkkNgrm+yk7m4vt3OpOtfpSQ0DBKNg/vMp hyyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PUfcmUCc; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h43si1657954edb.89.2019.11.22.02.53.39; Fri, 22 Nov 2019 02:53:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PUfcmUCc; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729649AbfKVKxh (ORCPT + 15 others); Fri, 22 Nov 2019 05:53:37 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44873 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730223AbfKVKxg (ORCPT ); Fri, 22 Nov 2019 05:53:36 -0500 Received: by mail-wr1-f68.google.com with SMTP id i12so8001418wrn.11 for ; Fri, 22 Nov 2019 02:53:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=oIIGMhbYISHZGu9r96uoFeZiZpVGd1I91v4mf/cGzkM=; b=PUfcmUCcLNfVPw8lb6rvYxvuuivUoRhYRYTYBP0Pz6g1prA6DtYXazm7EeslR16aHJ 1xC4xgfYq/lYYfDr4cG3q22YJtUDzN2oGoAd5DuuB0AlyKCbrNAXz/iVqGPJYNenVRgu NtJZY6dJbpUgdVZCjE0Lo7e1Q/Noy3l59VB97KrqTLCHM1fV0HNGQFoDLjmQ91E5VZaW hG+7ujJEmFvqUMGP39f5qVCOODf5CHsMOQlGzYoajO0t/sHicVuUZyltABD4Kagy54lL vfFm1EuzA0CKamhP+fHIeknSZ+diZCGppDCl6u3l8wRDrid7D669x5Im12eTnSCmVwIP D5OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oIIGMhbYISHZGu9r96uoFeZiZpVGd1I91v4mf/cGzkM=; b=cOcBDKmgeS5KUcWYh6Vc9FSPBP2JwVq6jfkPj+SEepUnl/r8BxX2H07PiLcbKE1HjG CgNq1dll7qOHBwzX+p97T/Pj87QPv59kc/SKgv42MiGVaFVY40r8c/113TPuZAkOziGQ 1fSMOEef2g44jkbAgFT4g010Uwp+nY53zc4MIjkYMl0d8fzdcZJxKJ+RvqaHR/xDGnBv yKQzXoNt9vIm2SNj6/bHp0e8kAhTjjwQySJZ9JBeLZjSyQDN2vBsugMcHTRYV4VDgPNx lwn5hPnI/VJu2x1TFFX3Cfkahqf/jcbveNr7JGvMtDr4G5/fUzAesHGBMZV3/3le67JN Kzfw== X-Gm-Message-State: APjAAAWBQdZLZOW2uQExnM64Usep4oDoy7hoOLRddGmMHmzYNwdjFp53 +vHveJ6cZLz4klgOAPPS0lwx9A== X-Received: by 2002:adf:90d0:: with SMTP id i74mr16311198wri.298.1574420014557; Fri, 22 Nov 2019 02:53:34 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id o1sm7444087wrs.50.2019.11.22.02.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:53:34 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.9 8/8] ext4: avoid unnecessary stalls in ext4_evict_inode() Date: Fri, 22 Nov 2019 10:52:53 +0000 Message-Id: <20191122105253.11375-8-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105253.11375-1-lee.jones@linaro.org> References: <20191122105253.11375-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jan Kara [ Upstream commit 3abb1a0fc2871f2db52199e1748a1d48a54a3427 ] These days inode reclaim calls evict_inode() only when it has no pages in the mapping. In that case it is not necessary to wait for transaction commit in ext4_evict_inode() as there can be no pages waiting to be committed. So avoid unnecessary transaction waiting in that case. We still have to keep the check for the case where ext4_evict_inode() gets called from other paths (e.g. umount) where inode still can have some page cache pages. Reported-by: Johannes Weiner Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Signed-off-by: Lee Jones --- fs/ext4/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.24.0 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index a73056e06bde..2ad48d166f32 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -212,7 +212,8 @@ void ext4_evict_inode(struct inode *inode) */ if (inode->i_ino != EXT4_JOURNAL_INO && ext4_should_journal_data(inode) && - (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode))) { + (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) && + inode->i_data.nrpages) { journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; tid_t commit_tid = EXT4_I(inode)->i_datasync_tid;