From patchwork Wed Oct 16 00:22:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13837476 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31DD5D20687 for ; Wed, 16 Oct 2024 00:22:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B58E76B0082; Tue, 15 Oct 2024 20:22:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B091D6B0088; Tue, 15 Oct 2024 20:22:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9828C6B0089; Tue, 15 Oct 2024 20:22:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6FE736B0082 for ; Tue, 15 Oct 2024 20:22:47 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8ECD9141981 for ; Wed, 16 Oct 2024 00:22:37 +0000 (UTC) X-FDA: 82677564270.17.72487CF Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by imf30.hostedemail.com (Postfix) with ESMTP id 5D1868000F for ; Wed, 16 Oct 2024 00:22:30 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="I3ZLDB/E"; spf=pass (imf30.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.49 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729038021; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=OOtMx79VBXCrKkiz0LeU3UCvAvH+TyMdK09OT/IDMfg=; b=ShqMIKKQ0EswfY4p2DbXpCj5xCEOIqcY3TmwkMa9mOu2NDwIFcshV6UJ6ueqeJIiXsdnQc vZe+U1hvcKNuGD9s26nNWFNNXaGORg36LsRWBpK8gHeD0Yylb3ykOawx6bpkdAavyAirrb zBsHmGkzN7aw/Puf5Jfu+rTBWHmhOi8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729038021; a=rsa-sha256; cv=none; b=PwSyCSgNXJhZcqFyz5B+/aW3AHMl/ZxO1tztntTWfnHVPT9Sih0i6PCVDPHlCzg+GcymP3 rV95L2pxKr8pxrF7CZnJjI/o1b6QLE78SEbAgneeGGF9d22SWhqH6gZjTLkRrOuCBvzWTC D7GFTB4q6XaooNyON4u9zzlRnZ/I1I8= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="I3ZLDB/E"; spf=pass (imf30.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.49 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5c941623a5aso672136a12.0 for ; Tue, 15 Oct 2024 17:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729038164; x=1729642964; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=OOtMx79VBXCrKkiz0LeU3UCvAvH+TyMdK09OT/IDMfg=; b=I3ZLDB/E9dB0xEl5xI7+HY4TkRVz5D6BvJ0PHWF/KiwyqvROSRyRXLSCcxqa13QdcT yhAtuqzxeueiErBGg0Snqs2WDHhtpeHCviBOyQyIhitjSHTeLnfiedIDhAsGxSvvENCS 33QpJe+czTurF7/CUwYtLqU2X/n5YH8UeZUXV3lt0yH9sgL9iJ3VtbMq/wtUurZqn7CR KDXDxfTlw6JxiQ2Hn/KK4yvipdx6MiAwcfzcEz3mRar0M5Gcqja94op8ZoxyJ8QcOrQb FY/Q9xAZyfisgIHqj2zveUsjPFGy2R1K6O5tdk5p1Ou6UIhJEhsXuFqG0qILzRtsGu64 67LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729038164; x=1729642964; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OOtMx79VBXCrKkiz0LeU3UCvAvH+TyMdK09OT/IDMfg=; b=QBgCS8W7eY2jLEBrA6aWiITr24uf83RzsKAV8j57UqnQbv6cfFJslwAr7DFtfXpsof Ex4+YPkgWdlXcYTGBoXDrBFS21Z24Vt5f4Uaf0z/UInD8WMx8G0RCr6jzVFfs44OWHVR whEGAIp0dO/n6X562fT7Y63RaPmfCFj0LcdH+uAcHLegIv1RE80fb9YbcyIplG2yr++H kQGSL15r6oD9zb+iM9UHlbex9snyUApPejiKnXlPTWkMVs1NRtkCDYdH1Bx/RKj4XvAb 66D/Rv6izoWVVUS5/+gzFaERsJhq23iSlLETGL/A0Bz0RD3Qp/hUZP+BxTFaYUaM5Lx/ MKnA== X-Forwarded-Encrypted: i=1; AJvYcCXIFejBcrhJXFPqp6I3XZRCGpXTSjkvoRXdYFrjPNgJDoNZCABgxnDickIXojEA4eWGDhgTY9zOgA==@kvack.org X-Gm-Message-State: AOJu0YyYlitkrXZOTA3SsCJwTTQ78FAP80/Mf+PDmmJtPCJSCqMJg3CQ 4SyvDzzsc2KzalvFRsfj3Zmoqeavi8xFcZVaOqxukT7v0lh0mUB5iT4kgMOO X-Google-Smtp-Source: AGHT+IGiRJD2/hw0nBZOgYEdXRqEYRky2AQ+3HNzkeC4OqSoTzZpS/WvhTKrCcDsJn+qip6H/13BNw== X-Received: by 2002:a05:6402:27d1:b0:5c9:763e:e2e9 with SMTP id 4fb4d7f45d1cf-5c99497f24dmr2001841a12.14.1729038163473; Tue, 15 Oct 2024 17:22:43 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c98d508160sm1152733a12.50.2024.10.15.17.22.40 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Oct 2024 17:22:41 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, Liam.Howlett@oracle.com Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang , "Liam R . Howlett" , Sidhartha Kumar , Lorenzo Stoakes Subject: [PATCH 1/2] maple_tree: calculate new_end when needed Date: Wed, 16 Oct 2024 00:22:20 +0000 Message-Id: <20241016002221.32428-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20241016002221.32428-1-richard.weiyang@gmail.com> References: <20241016002221.32428-1-richard.weiyang@gmail.com> X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 5D1868000F X-Stat-Signature: ntxfnj6k44c7xceoaejfks83ct7d3433 X-HE-Tag: 1729038150-699549 X-HE-Meta: U2FsdGVkX191igMf+hDEdvRUk55ctf5sUXWzgswCfAR03/Zt7N9dSXUHKhyWDRSh2O4HCaJmdib2Em7scXFxM/w2pwnwkVIh/0gFZ21INf0c3m3QXU2AlDMmsQORynSzwaoO+MoXEle7z2uBYHrNYKlRshcZpKQUEQz444uD+B8YQrDfKu2sKagi3Zivj2Qrldqx6HOuchBh5GVbYa+qL3QPCiVXP580VBtNS4eCc6sY66zGTRMp7apsM0uvQCYZOjbqLdsBw2/GbYGmhD+FSY/TrmhJO0p9yaDT22Hsaza8Jpnzkf1Jq0gWXRuEkIU4yMkNk0QNodHHws+nsMCmwC0pLeiJiahSbkBM56XmWSOUsbgtvXJQGgQ5L61E45GelUNLUE2n5K0mDfnRu/1Gah6DHVa3iZep+IKSZzGxxbgYDk3s4oqssMjBE+Vv7NxSfwPtRB88KynKko3s5Kxme6b5VEd/v3gMQ29y/5lSXKJZF6V166hDKBjRSB7UTVSiz2CF91/a9noiSDyQ56JMmO3Mrd/0dREW1qfzpbTruImJFrwfvtPZCpSTzA3bITohZ4I4SnF74g20Nc9Xw9ESazSSyWFPK+V/l7jNrPiRq9xhz4LXfspInwRlGVPuKMeXInFNDp9IELEfl8Me3K2GozVy3EY46AK/XgHWgiqugNiEEpbZF/fBiRion7d/SuNUIkt4+aLVgKrK1wkRXys9c0Py0XApN+/w+ZPJObUUub4d6eC4ieg58YOLZhULQM8P1QUBPO0EJw5MFyeajZw1Ua1L55wCcbChb1QoB99qHTsGRKKIvYavgdxHe4ew9l8M+2GmiY4fpBTsKY4xl5SWrRvCqTiBWwQF7MvWzxVj6doq84RoPrspRf2CKGy4TvPYB1BqybOEourv9SRLBhfPy1Znpyb17HBGCk4GQpGxzhmGwh52Eh+vQA0ewvmiKr73n5qaYPiwD+OsPcjs8Vh mnTaF02Y weZCVm6VTLdIRXSyNYRqrPRPTijPF0P1KCHHckaPSKAzr9nLrP7DZFBcdqJcywAMYxb/hItuV62gGPzUvMFkpesStKl/00k0hYdhe0kUfHKd8fDTVrrlbYbocH3SaeH0/eGHQa+la1hPdJ86e1nphEk3KBZE9MoWnqpcbyvEwAlqQAZWU/ZCrdhRDRu0+jyBrLumaGg2M63u8AydopLzXuhmZ+Az8ZMb/SGlyYEfEsv2mQh/pkNzHGG4jwceIrYykmBuD9G9PHkY4bnlyA3poglUruHPG1b9UHKT1vZx/9c2k/R18+N47zZgnDBIghKuKBMWbHLnJYuvQtVTkUR+pWuhMwHAqDaXrQMm9x+aMdLpLI8ehyARCSoVTUNmNiEAcW/0qe3apudZWha1qR52xgSccqGAhFgZnN7AJ6OkbZZhkJr5BttwV9tufcb+5E/lKxQjta3IjX/vFPyBwIBb38V+VutSLPsHt1pq9XWvbMsCcJlKtPidBwV+OSQtd69ghahrw 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: List-Subscribe: List-Unsubscribe: For wr_exact_fit/wr_new_root, we don't need to calculate new_end. Let's postpone it until necessary. Signed-off-by: Wei Yang CC: Liam R. Howlett CC: Sidhartha Kumar CC: Lorenzo Stoakes Reviewed-by: Sidhartha Kumar Reviewed-by: Liam R. Howlett --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 61de8f1daee8..f2628e3f3efc 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4122,7 +4122,6 @@ static inline void mas_wr_store_type(struct ma_wr_state *wr_mas) if (!wr_mas->entry) mas_wr_extend_null(wr_mas); - new_end = mas_wr_new_end(wr_mas); if ((wr_mas->r_min == mas->index) && (wr_mas->r_max == mas->last)) { mas->store_type = wr_exact_fit; return; @@ -4133,6 +4132,7 @@ static inline void mas_wr_store_type(struct ma_wr_state *wr_mas) return; } + new_end = mas_wr_new_end(wr_mas); /* Potential spanning rebalance collapsing a node */ if (new_end < mt_min_slots[wr_mas->type]) { if (!mte_is_root(mas->node)) { From patchwork Wed Oct 16 00:22:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13837477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67BBCD20687 for ; Wed, 16 Oct 2024 00:22:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EB62C6B0089; Tue, 15 Oct 2024 20:22:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E3DA26B008A; Tue, 15 Oct 2024 20:22:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C900D6B008C; Tue, 15 Oct 2024 20:22:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id AAD8D6B0089 for ; Tue, 15 Oct 2024 20:22:50 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 6E8A741A2B for ; Wed, 16 Oct 2024 00:22:44 +0000 (UTC) X-FDA: 82677564564.13.41D61C0 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by imf06.hostedemail.com (Postfix) with ESMTP id 8584118000F for ; Wed, 16 Oct 2024 00:22:42 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SpENEsNo; spf=pass (imf06.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.50 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729038095; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=feFYTn2DwcxxK1/gGgrI/c+N37acDBpmDmc8y/yNEVs=; b=G2HzqOm8J1YwYMt4iR6x024DTek3c5oDZAXqrjpcw0DiacSmP28ic/Obl01SI1EB5dLHhr gAZp3Bzs6ljlW53KNf/fWcUExXUCl4jhswWfprvLtN+vy7iYxu7EOSgoLxWxe1JAJtbhzF XH2LLTFw7KkxFpnTQPg9sJK6J/82joY= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SpENEsNo; spf=pass (imf06.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.50 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729038095; a=rsa-sha256; cv=none; b=n8Ldws3Mh85YBZUc9CxlK5AYAcvbhkuSmIPZH+dfy/WIP0e59PD4e50leiqwzRny5UrzBD gckmLjUYnGi3Sk0iylL5OgApoGPpv1C7v/GKO0kfmdsJHNPC1Fmljh5gCD476zMnX7OZDT QXkxLCrDTBFoapHTiszUolyfKWFtfeU= Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5c96b2a11e7so4407996a12.3 for ; Tue, 15 Oct 2024 17:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729038167; x=1729642967; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=feFYTn2DwcxxK1/gGgrI/c+N37acDBpmDmc8y/yNEVs=; b=SpENEsNoPev2BjTDjMnNHY+kb+v3v2kMJvcju2dZYSTg2Z/7CdqCPf91bgabrUns7n jNu2JnufbJRZn6dy18xcq1A6wpqt4LFuIHZ7pqraoC4lHWNEYqQXNqDrM83/t6YmQqpI wa8Kw21uFbJMnF2ZNYMOxM44v0xZppJhCTfhNsQzk/39SxqGwkRY/SI0UnkL3HmMD1Ov 8aQDh7MDaKfYZXJ/Lo6DaFIgjCnjKiw67qDKGWAZy5yahb02cxrs3jLWK7a9z1BEYXRH Njw3KHEQodGIImN2ubtaUj48nJBNYGUe38hZrG7S0mWT8/LSVpv/Cwp91ZLMYZnl+5Eb u43w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729038167; x=1729642967; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=feFYTn2DwcxxK1/gGgrI/c+N37acDBpmDmc8y/yNEVs=; b=C5bICMTXL1ovn/+Q7LFyKE1ARyHWMXK5yrmfUfRt2bXESG5z9ZkG3U0FarUhYG26/5 Eco5XcW7n/u7FvdfRNDAqKKx6wzJae1RvTYpeOCLhqKV6f/pAIRXqBu8e2SddMk47ILD f52nemAtak31GE4ZSB5Aydozau7BBiTLQyP0Tr4/fVSJpaoS7bTNReIetMFYhBGulMJm 2bHksGLV5bFfEu3NJvgOVpoF4KdbElTVWO4ewL99rNHUVBOd1s60qijlNHzXcrSFyg/i sy8f3YmH0wTkXQEHiio7Ja2CsdigeE+tY2q+/IThIZ1tWwnxbjY3bsldU8fxt4UEWUEb wifw== X-Forwarded-Encrypted: i=1; AJvYcCUCjmrO23dZYRnxgMh6hQvjrhGmuLnTAeIVhGF8dldm7UbyTEZWyrKQH12t4JnVWZp8PC9eoEKYHw==@kvack.org X-Gm-Message-State: AOJu0YyNdGny0OLGjQBhzncTwnrCkQpsHZATFOhjKeTREmlxnKlr+O3q D6fpI86yo4eKqaz++H9P3ViMqOKQ8atUqcoqQpxpaiLSIQFI+SZ4606mdnND X-Google-Smtp-Source: AGHT+IH9DW//5LVneE0dAj93xoI1yGfzxl0BUQUToyrbydzth2nBUkrHLW84Mco5ha3oRiMorl4yww== X-Received: by 2002:a17:907:3da3:b0:a99:5ad9:b672 with SMTP id a640c23a62f3a-a99e3b20bfcmr1416594066b.10.1729038166648; Tue, 15 Oct 2024 17:22:46 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a29749559sm120184166b.58.2024.10.15.17.22.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Oct 2024 17:22:45 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, Liam.Howlett@oracle.com Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang , "Liam R . Howlett" , Sidhartha Kumar , Lorenzo Stoakes Subject: [PATCH 2/2] maple_tree: remove sanity check from mas_wr_slot_store() Date: Wed, 16 Oct 2024 00:22:21 +0000 Message-Id: <20241016002221.32428-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20241016002221.32428-1-richard.weiyang@gmail.com> References: <20241016002221.32428-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 8584118000F X-Stat-Signature: 3w1ksunmt3dqa7he3r6ram4img1gfq9q X-HE-Tag: 1729038162-712664 X-HE-Meta: U2FsdGVkX1/Kfq0zNUSUy0X6vlLxH9gHEA9GrhIUESQ7TXkOGVfjFGiWb6u81/b3pkedvZVrgGfmMEDvhc7ipvv7RlgkbuxDxhXyOWIWQOrzxsL8IMtXyzK5X3QS5cqhY8sARXmgo+aJFEm4WT+ual1HA0ynYr2YgykUorBykMvbQGhc6yAmTuQEiaUtb9VxwUJUF89ir7kNb0P13GANZVBad5/H8AY8y2jRYFXkzf6A9pyt66+z9rHlfJTphbhWY9TXLP+zH+RVP3J6XKutTqGkI/d4fajtj7qvnGdow/YaaCUKoLrwwmAvs/gfV8jJmxGUsdjRq7Pn/qfVPimPW2/L/5I4nf/004Ktb5RJIesbQPgomfAIaRdRryltN79bRJMEpujS/lgTnZr6VIT0OCozxexUSE2ObQbC387+rZr2oVLNe/ob+FoSnm1t88S1cHHLfMAAVhBSYeuSgKOXpOXdj9Fppr1vwlTqFmPxwz7nzVwOUVm7AlxfF3mxVh0EsDsAhORbfoFNG9vbW6VHkNbBLYmejtGjgJyhCm6FFA9lhZiT29RQSWel1+rl6LYeDJop9bwdsieJgy3mr7cFidtUFd3RLRpgw1pjD9lNbq7p4WJTpWqR6QgfSLrwZbIVZkEU9uzXMZ2khqX3nVpTxtVwCnDpIm6MecvuBCge4UNUoeEtsvn456wkKY7rkiemzeIM+122lf7C0t98OP3S6Hmi83K449zp5/CbsN7oT2adqc6qgG1SIprT3cL8nWzwVxpPg+Tj7KmxY5q9/kd60svLwz6Eru/wrirJBvKJdoiE/pCBF8xuxSwp5m/aG9qgfMX1d8XEjDEchhUOLKpYeo1jupvtjNzyOg1eDH0OcphCdk/6ryfd2N4Q2LSWEl9UnPG5YindH+nUlThawjor8nGX7kLKF6VF8kB/59vzbl93kXzHceiC6zzfUrQSy7MjiWXliAY4UB0kPyJsJ7I EZPP61JB Knx6GAoFPnaePEB9TVY2bmlLlPjzRc8Wr+RTCMoGtJ4YuwGmLkdiPwYyBK+co/cCZVFVbPhiWG3bm1XaudMuh9hg/FRlipwRgiXl8Av9k1sIyWfIm7bq6gnz/6px09P4wnpVuVthJLM6jv3LdPYS7ndAXuRhfK6aYdPSngkLITzkxrM/f7vjUmC+36mNi6tJPfAIOcAVzxfyiouolRnwWXb/Z18LBNf4UbyGEDVt5qf9YABLymNj2UGjTuDWS9V+IKVMuHIvrMUrPzbZsrThmJN7rERIaPPKAwscyk1QwwOQBQeYxu2vgMie24eicfeSS2qzrY+twPeNcg2v0jfipJn1nDAehHVAiAyeRTiVvCs05Vh2TvPPFsu4x/S49LA7pyyrJqbIfy2v5LdV/4o6EXRiu2upbf0v8gRhLQSvmFlZAO+iLzVykEDMP5i3izD/Fl7Y4EAdEDF1ZM67ZBiiLmx3nV0uY6PLSgsv+Arbp8NMjj5qv2Qc2rhaO3+08f6ZvqsgK X-Bogosity: Ham, tests=bogofilter, spamicity=0.000074, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: After commit 5d659bbb52a2 ("maple_tree: introduce mas_wr_store_type()"), the check here is redundant. Let's remove it. Signed-off-by: Wei Yang CC: Liam R. Howlett CC: Sidhartha Kumar CC: Lorenzo Stoakes Reviewed-by: Sidhartha Kumar --- lib/maple_tree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index f2628e3f3efc..5dfc589a8cde 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3810,7 +3810,7 @@ static inline void mas_wr_slot_store(struct ma_wr_state *wr_mas) wr_mas->pivots[offset] = mas->index - 1; mas->offset++; /* Keep mas accurate. */ } - } else if (!mt_in_rcu(mas->tree)) { + } else { /* * Expand the range, only partially overwriting the previous and * next ranges @@ -3820,8 +3820,6 @@ static inline void mas_wr_slot_store(struct ma_wr_state *wr_mas) wr_mas->pivots[offset] = mas->index - 1; wr_mas->pivots[offset + 1] = mas->last; mas->offset++; /* Keep mas accurate. */ - } else { - return; } trace_ma_write(__func__, mas, 0, wr_mas->entry);