Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4209700imm; Fri, 18 May 2018 00:55:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqtlkWn8wZZpYl0T4nqd//6BRB5UwzRZkU5qoJ5Cqe52pzU8b7Tr0T/IWBhhvQxfy9zMXmx X-Received: by 2002:a17:902:b492:: with SMTP id y18-v6mr599770plr.2.1526630145064; Fri, 18 May 2018 00:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526630145; cv=none; d=google.com; s=arc-20160816; b=cxlcLpLPud7WzdqOiE32TxjVaFB6XoJ18WrZIxjJrszBbD4HjiXUm8R3wPzD96aXNS 0BkXYUck24xzI40/7ijETw+KKcSOpke5pDXKq0bWH+1MtlXps2/Oo91sLGgxpZ2M8FCf QOoC96f/2m92W4UGow41qaglkpcGqEvK48NO2EnJJ8THHIpaO2Ap2pMcm/t5mQlTfjSC ncait/Owja4kh1mmnOBlsiyyqnLLVp8IgWfWnzABzNNqDog4N7iNMZuH/e1OqeyT6H/L f0Cj/iDGNCXuCruztco+H0UZbg6yRgaNNydwc2G0D2+0jazcMxUaNNoplVQrq8vUc8H1 4fHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Ghhw60hj/vr+ZaudlP5N9763FlehigDUZ1//ZnPTIJE=; b=NLDJBSjaswcCIYr+GO9MTveDmgQSAMXN6Tj1vITAzFy9358nhWlrhrNgqgWOiKZ6oB OCjTjO1JE5sRn/tZOlw6syQSOggvTK6PaLTzYD3pitD9oKUc406I54/EXiPhXy2Sk0z7 kPcjby4l20S6tOau2d3ghp0bbvEoP5MXqT6xzcnuN8Ky/KBl75xPEp9NSb6itSi1ANOo u0IrKZgl6Tly3wdM0wkg/A//Mok/DJM8m+4Mgs6vBOk7ftpNRTFUeC2cSB3p90gGpGW6 OQMVNAAmFBEn9BRzPHad2WhZuTklBo3vMgFuNVMcEJ2/pm1Krbo3VuW61zXH9HCKptMY ruNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FsH87X79; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24-v6si6939954pfj.231.2018.05.18.00.55.30; Fri, 18 May 2018 00:55:45 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FsH87X79; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752564AbeERHxv (ORCPT + 99 others); Fri, 18 May 2018 03:53:51 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:38834 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752243AbeERHuH (ORCPT ); Fri, 18 May 2018 03:50:07 -0400 Received: by mail-qt0-f195.google.com with SMTP id m9-v6so9159980qtb.5; Fri, 18 May 2018 00:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ghhw60hj/vr+ZaudlP5N9763FlehigDUZ1//ZnPTIJE=; b=FsH87X79G0ltOJM3KQoHEJtfRy1bPx4ucL9aJuH+4kvrUjqogO1JK+eTtXloWKarTl WlDFjag+ktUKQNtbyn5aCiB6IHePs25v1tfxs/rNgeydKjiE06LlnP0GifPuHMO3s9Qc VKJCzh3Pr0YX8NvaC7/mJRghJqdLdrEFSDbBKGAmcVFgKMwhurpNO70z41V0lAsiTzbA e/506nyDaxq7pY+gTkbcVCLy0vKdJBhobA0Q8jFmqWX/QIqjeDuM6fM+UMkNG8/xKrNn WHa0Knjwbt4K9UMAyMvRCvj2tCMeu3dOP5X4G0VnTYscCNgdymn9fVcEo2BXzTy3Rz79 5u4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ghhw60hj/vr+ZaudlP5N9763FlehigDUZ1//ZnPTIJE=; b=BgPrRCqfnrmJ+8nFO3vhlzo/rlwhxQqVktTauZsk9yKWxrLEaEIDJdZa4R06WFsRMK 0P2hg9GxAorJSXG9Y9cCCwbhReeSgA0SKVXn2SDJbxg9G9FZO+tp4Ir9+iMDFCVl/dY4 f7g0ZR13pjKgbzAQ+O2/B2lFlMeXFugYPZg85vbzugSw+5SUXGWyth1INBNzpkgFFbhA EieoGSMgqXDFcAIHn0pHaQncCUIkfuVa675oV4/iz4rjN2dGY7V7cpDpSYx+MX+GxL1+ OwtKqtpXYwWHKWW/zZJBN0XZPWRwJWI3NEPC5Ded1/DD/enpxpaJeUH/bZ3Pw5eXS/yB ZSAA== X-Gm-Message-State: ALKqPwfdpvAPMmRNeROORvhmzV36CaJciED+i9gDzaWU2J0WgAmO6tQF 9kzrLBZRLd6TDza3TKbZYWJzFXIaFw== X-Received: by 2002:aed:3f17:: with SMTP id p23-v6mr8312541qtf.57.1526629806345; Fri, 18 May 2018 00:50:06 -0700 (PDT) Received: from localhost.localdomain (c-71-234-172-214.hsd1.vt.comcast.net. [71.234.172.214]) by smtp.gmail.com with ESMTPSA id s64-v6sm5443004qkl.85.2018.05.18.00.50.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 00:50:05 -0700 (PDT) From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Kent Overstreet , Andrew Morton , Dave Chinner , darrick.wong@oracle.com, tytso@mit.edu, linux-btrfs@vger.kernel.org, clm@fb.com, jbacik@fb.com, viro@zeniv.linux.org.uk, willy@infradead.org, peterz@infradead.org Subject: [PATCH 05/10] don't use spin_lock_irqsave() unnecessarily Date: Fri, 18 May 2018 03:49:08 -0400 Message-Id: <20180518074918.13816-11-kent.overstreet@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518074918.13816-1-kent.overstreet@gmail.com> References: <20180518074918.13816-1-kent.overstreet@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Kent Overstreet --- mm/page-writeback.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 586f31261c..17ccc294c9 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2460,20 +2460,19 @@ int __set_page_dirty_nobuffers(struct page *page) lock_page_memcg(page); if (!TestSetPageDirty(page)) { struct address_space *mapping = page_mapping(page); - unsigned long flags; if (!mapping) { unlock_page_memcg(page); return 1; } - spin_lock_irqsave(&mapping->tree_lock, flags); + spin_lock_irq(&mapping->tree_lock); BUG_ON(page_mapping(page) != mapping); WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page)); account_page_dirtied(page, mapping); radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); - spin_unlock_irqrestore(&mapping->tree_lock, flags); + spin_unlock_irq(&mapping->tree_lock); unlock_page_memcg(page); if (mapping->host) { -- 2.17.0