Received: by 10.223.176.5 with SMTP id f5csp1991330wra; Sun, 4 Feb 2018 17:37:11 -0800 (PST) X-Google-Smtp-Source: AH8x227GW3KfooF/DotAXMLPQQMMsJjs9riFnVTWHyVsPVROh4BeJNxKMx/W0MR0mo/pHz9sTM58 X-Received: by 2002:a17:902:2803:: with SMTP id e3-v6mr10406256plb.447.1517794631447; Sun, 04 Feb 2018 17:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517794631; cv=none; d=google.com; s=arc-20160816; b=qehSrmWMX47/0p505H8e5H+FiTx0WUspvHNXp9M8+f7L96QzXQDWrChKeWZl4e2QtI ZJmV3jOUYdq2oPHMKw5Dx2xG4MkY8Pc3p2qUG1RoeLyayJfv1m3H2TffV+UVgW+371ek 54zdLqmH/olBK4XL56fiiBJyYeccHAYPiaKckoeXktWBr2Dwecrhm19d22vS0UJbrvsR j4WJpABFuzH0HTxDBKU+OJqolcYgcvx5YlPJ3NBX6DKMZAKlo48Qxe4X/RF9nKXUiTzt xkTHxLQDOKltS5EFEj1uyABdpAPyF0t+jXqo6Q0y0pfvUJrC/9iwWayDh8C19ZmJJjIK zo7Q== 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:arc-authentication-results; bh=mg20bCFPX9GD2E035BZFMn9dr5H2NVTOK7BEChM2lx8=; b=bvX3Qb8geJhBcIt3bIDoUcmiBgLQlJ36V7T7mk2OEMCcY1bC8YB6UeCI/3txv4pCsb d/9xlR8V9PAnSMRRHs5Vkn3uOYJkWBCCbVs4woTzBPM6k4DxOgJgDqa5bNb+v/oy4BcB 7GEUKtXVyX7USB28tw5d1vL1BX2eoGDvfWVRdEEmeNjrOqyxyr41SB4B9i12hoWbK3TN PKkREM04MZGlMARt5EHvPipn3Sm458UQ+J4+RWezutrHUhAEVgH4lmANDR/4heSL4Aoq w9diimqHPqfz5dqXkvnzSkR7KMxheWMgE44La/kyWQ1TYzTkc3BhAa3aHMs4TrzjaaNd uuTQ== 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 m27si4857062pgn.667.2018.02.04.17.36.56; Sun, 04 Feb 2018 17:37:11 -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 S1752855AbeBEBfV (ORCPT + 99 others); Sun, 4 Feb 2018 20:35:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:43681 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbeBEB3L (ORCPT ); Sun, 4 Feb 2018 20:29:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3A7E5AE10; Mon, 5 Feb 2018 01:28:01 +0000 (UTC) From: Davidlohr Bueso To: akpm@linux-foundation.org, mingo@kernel.org Cc: peterz@infradead.org, ldufour@linux.vnet.ibm.com, jack@suse.cz, mhocko@kernel.org, kirill.shutemov@linux.intel.com, mawilcox@microsoft.com, mgorman@techsingularity.net, dave@stgolabs.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: [PATCH 41/64] arch/cris: use mm locking wrappers Date: Mon, 5 Feb 2018 02:27:31 +0100 Message-Id: <20180205012754.23615-42-dbueso@wotan.suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180205012754.23615-1-dbueso@wotan.suse.de> References: <20180205012754.23615-1-dbueso@wotan.suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/cris/mm/fault.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 16af16d77269..decc8f1fbc9d 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c @@ -122,7 +122,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs, if (user_mode(regs)) flags |= FAULT_FLAG_USER; retry: - down_read(&mm->mmap_sem); + mm_read_lock(mm, &mmrange); vma = find_vma(mm, address); if (!vma) goto bad_area; @@ -205,7 +205,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs, } } - up_read(&mm->mmap_sem); + mm_read_unlock(mm, &mmrange); return; /* @@ -214,7 +214,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs, */ bad_area: - up_read(&mm->mmap_sem); + mm_read_unlock(mm, &mmrange); bad_area_nosemaphore: DPG(show_registers(regs)); @@ -286,14 +286,14 @@ do_page_fault(unsigned long address, struct pt_regs *regs, */ out_of_memory: - up_read(&mm->mmap_sem); + mm_read_unlock(mm, &mmrange); if (!user_mode(regs)) goto no_context; pagefault_out_of_memory(); return; do_sigbus: - up_read(&mm->mmap_sem); + mm_read_unlock(mm, &mmrange); /* * Send a sigbus, regardless of whether we were in kernel -- 2.13.6