From patchwork Fri May 18 07:49:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 10408455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9963B601F9 for ; Fri, 18 May 2018 07:54:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C36E286F6 for ; Fri, 18 May 2018 07:54:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80F4E28899; Fri, 18 May 2018 07:54:07 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2ABCE286F6 for ; Fri, 18 May 2018 07:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752438AbeERHxv (ORCPT ); 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-Google-Smtp-Source: AB8JxZp0yqBKvY4Lg7CVP7fdHYZSpGZl2wnJm9VQ0mQ/1lp38N2toLETml7fcxC6UlH5M4JXi67jjw== 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-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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) {