Message ID | 20210430195232.30491-3-michel@lespinasse.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=xn6i=J3=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B43C43460 for <linux-mm@archiver.kernel.org>; Fri, 30 Apr 2021 19:52:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B4067613F8 for <linux-mm@archiver.kernel.org>; Fri, 30 Apr 2021 19:52:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4067613F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=lespinasse.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 475E46B0036; Fri, 30 Apr 2021 15:52:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 421E76B006E; Fri, 30 Apr 2021 15:52:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13CE36B0036; Fri, 30 Apr 2021 15:52:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id BE9D26B0036 for <linux-mm@kvack.org>; Fri, 30 Apr 2021 15:52:35 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 705943CF8 for <linux-mm@kvack.org>; Fri, 30 Apr 2021 19:52:35 +0000 (UTC) X-FDA: 78090080670.08.3118601 Received: from server.lespinasse.org (server.lespinasse.org [63.205.204.226]) by imf18.hostedemail.com (Postfix) with ESMTP id D8111200027D for <linux-mm@kvack.org>; Fri, 30 Apr 2021 19:52:36 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-14-ed; t=1619812353; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=NVL7JPD4xKaWrJCrCCQAhxOaIfpgRthzGvlvMAcHMhY=; b=seFAG+swPapZKqpejXszQzpaIdmpkFiiKJBqE4tgh7BHr7TiZ7gnyCpxzN8EIlmwm8g58 W9e7ERKDPuPRXxvCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-14-rsa; t=1619812353; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=NVL7JPD4xKaWrJCrCCQAhxOaIfpgRthzGvlvMAcHMhY=; b=Hr12W9SJ/k10T+AhevxFw7Xi/5TWRi39IsNggQfIKgJvy8FTTJ/1TIWDD4/EM8/GYwZpv wOk+SqRuC5x5GH5yfrje+m/9tY/aG8W7ipIjF2hwVdNO3FcbbB82d+GTS7m9JoiNr0ywZrn mElAhRQk77OBX5vcMLgCS9rQAva0NBgBVAFWJzGc81wJJOeImQFD3aKpNbJ+r+0VMABNEyL 50XdZ6f4s2Y8lv/vqQRJllplvm4dz8f0IcOlja45ytEz53pLQ755IUI7QSltT6/N+Zwz8TK /sCXe+fw3IZD5K1NRhozh6yhxnVV821EBybHtmFvC/e3DjInR9QutLwILhGQ== Received: from zeus.lespinasse.org (zeus.lespinasse.org [10.0.0.150]) by server.lespinasse.org (Postfix) with ESMTPS id 1698016030A; Fri, 30 Apr 2021 12:52:33 -0700 (PDT) Received: by zeus.lespinasse.org (Postfix, from userid 1000) id 0638519F523; Fri, 30 Apr 2021 12:52:33 -0700 (PDT) From: Michel Lespinasse <michel@lespinasse.org> To: Linux-MM <linux-mm@kvack.org>, Linux-Kernel <linux-kernel@vger.kernel.org> Cc: Laurent Dufour <ldufour@linux.ibm.com>, Peter Zijlstra <peterz@infradead.org>, Michal Hocko <mhocko@suse.com>, Matthew Wilcox <willy@infradead.org>, Rik van Riel <riel@surriel.com>, Paul McKenney <paulmck@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Suren Baghdasaryan <surenb@google.com>, Joel Fernandes <joelaf@google.com>, Andy Lutomirski <luto@kernel.org>, Michel Lespinasse <michel@lespinasse.org> Subject: [PATCH 02/29] mmap locking API: mmap_lock_is_contended returns a bool Date: Fri, 30 Apr 2021 12:52:03 -0700 Message-Id: <20210430195232.30491-3-michel@lespinasse.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210430195232.30491-1-michel@lespinasse.org> References: <20210430195232.30491-1-michel@lespinasse.org> MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D8111200027D Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=lespinasse.org header.s=srv-14-ed header.b=seFAG+sw; dkim=pass header.d=lespinasse.org header.s=srv-14-rsa header.b=Hr12W9SJ; dmarc=pass (policy=none) header.from=lespinasse.org; spf=pass (imf18.hostedemail.com: domain of walken@lespinasse.org designates 63.205.204.226 as permitted sender) smtp.mailfrom=walken@lespinasse.org X-Stat-Signature: pwt7sn3ejw3yx5pr3ewi5k9b6twen1ow Received-SPF: none (lespinasse.org>: No applicable sender policy available) receiver=imf18; identity=mailfrom; envelope-from="<walken@lespinasse.org>"; helo=server.lespinasse.org; client-ip=63.205.204.226 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619812356-311821 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
[01/29] mm: export dump_mm
|
expand
|
diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h index 0540f0156f58..4e27f755766b 100644 --- a/include/linux/mmap_lock.h +++ b/include/linux/mmap_lock.h @@ -171,9 +171,9 @@ static inline void mmap_assert_write_locked(struct mm_struct *mm) VM_BUG_ON_MM(!rwsem_is_locked(&mm->mmap_lock), mm); } -static inline int mmap_lock_is_contended(struct mm_struct *mm) +static inline bool mmap_lock_is_contended(struct mm_struct *mm) { - return rwsem_is_contended(&mm->mmap_lock); + return rwsem_is_contended(&mm->mmap_lock) != 0; } #endif /* _LINUX_MMAP_LOCK_H */
Change mmap_lock_is_contended to return a bool value, rather than an int which the callers are then supposed to interpret as a bool. This is to ensure consistency with other mmap lock API functions (such as the trylock functions). Signed-off-by: Michel Lespinasse <michel@lespinasse.org> --- include/linux/mmap_lock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)