Message ID | 20240919234832.24237-2-richard.weiyang@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 7CD4DCF397B for <linux-mm@archiver.kernel.org>; Fri, 20 Sep 2024 00:40:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E2EF26B0085; Thu, 19 Sep 2024 20:40:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DB7D66B0088; Thu, 19 Sep 2024 20:40:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0A766B0089; Thu, 19 Sep 2024 20:40:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 986E76B0085 for <linux-mm@kvack.org>; Thu, 19 Sep 2024 20:40:07 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0D0AC810B9 for <linux-mm@kvack.org>; Fri, 20 Sep 2024 00:40:07 +0000 (UTC) X-FDA: 82583259654.20.11CB494 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by imf04.hostedemail.com (Postfix) with ESMTP id 452074000D for <linux-mm@kvack.org>; Fri, 20 Sep 2024 00:40:05 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Dg83uhRf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf04.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1726792679; 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=o+pwZSX6Ht1Aqcgt6hALFzoc9rFXm9RKG51oarHOWo8=; b=Ha1oeku9tpOD7sV+ByE4Q7U12P+Hs5dp8304N+9/Zi0SG9dC+I4ij0RYuDwe/+ExCO4MY9 mjU1HQqKNyot137rdJhoYE+7pEznSiq+6ipJtytvvoCQQWiXfMANXHrGacOGaApGzziBc/ jm+TzYQN4ec2CI7t5rXhkBkU1qTtyNI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1726792679; a=rsa-sha256; cv=none; b=SNBoomXggoyVUxx9aYj0uX70Ol5OuIDjry/DIapW11RaSOvOAeNRxN2H7xJGC1DkKaYJdK HQqVnF43BYQ5hyHt6ptxjbpX0RGWW5Bq3Za/08/ao6lWabhRZ17zWK8b72xqjx/NUMeGOg rWM4QGn03giORwOntzaOAZ1uTgz0I/0= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Dg83uhRf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf04.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a8a6d1766a7so198111266b.3 for <linux-mm@kvack.org>; Thu, 19 Sep 2024 17:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726792803; x=1727397603; 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=o+pwZSX6Ht1Aqcgt6hALFzoc9rFXm9RKG51oarHOWo8=; b=Dg83uhRfBYYgjuMh7/Q0n0N4O/N4yFIcjDP4zeRuhW8GdSohlarfIEzmxdS+lvr4uZ fH2S7WDnPKM+bm5elfXW4Ccn3xKkbyswF75UrdXDmXuR5sFxjcyALMjpjIiLUg3TgRU5 ZCUBVRBdinJudxDbffNaNRii6JqHmRieMH2dFaCDZZzGb1JkwYy0oZsBP5C/lL3ZdqmA cMqu7jelPIQ6wQr349SGMSJUu6dTJ11Wy4XRelDffTJm3hRM0KsbaXgaoO4v6JpDQvvL 8ceGAfgGM65o7f2tO42w7PT2cZGOb635vpR/4WAnt2I9PcqKrMCJ6ZVNMS9yNc/ZuAiM 9yOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726792803; x=1727397603; 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=o+pwZSX6Ht1Aqcgt6hALFzoc9rFXm9RKG51oarHOWo8=; b=HhokGi2T3EMFAEBRIdZb4XzVvwj8i3/mgp4WDfLi8YiVfstewMHcAAcq2Dy/Prlcs9 iqD8aHrz8UMGXKV0rpVesfIRTuvqeB5i9JtOSz1FXwViy//u/8FIzmcsx7fWK0xRq2xL CNgXprlLHksKghrF4eeVRySabRrOpXQoffQY8XkjlhxWDQHuIwwKLYNGk5UEg1LtY0WF t5GaJ396bM1OYS3Wb4N7RTdUASHd5PgTJQx0cAkbvk40UKBe6iJQHGP7VnXgo/bVfb1b 3XQaxWs/cFKT9PHrtA+tiJJLRDpRfISVZ8KQZ+mqBi7WMyg+HwdIz7/cCqI5dhy6kOqA u7YQ== X-Forwarded-Encrypted: i=1; AJvYcCVjDOGL+xnIKE8HcS7RVUbWy+lRLRtV2j7shRnlzMCtYS7sxMRObP2ViiUxzvKc/2WVqsJaoHVQwg==@kvack.org X-Gm-Message-State: AOJu0Ywo+QysE+bdbtMQJb+k9SDGyzE2OdVFtHrLer2FxT0RBrsu0MJv N7+RXk8RmBPZD5Vr074yPegiUYvNNyCcVokqKEsCjr8/lyEF/S3r X-Google-Smtp-Source: AGHT+IGxuBsjR9reIAIOk6I5thdKSBvdeP3Wj9LEQXt1SRdO+PW8OfV1/ydj+RAxSrZCbTK3WUtTww== X-Received: by 2002:a17:907:d3d8:b0:a8a:9054:8391 with SMTP id a640c23a62f3a-a90d4fc883emr59850466b.5.1726792803352; Thu, 19 Sep 2024 17:40:03 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9061096735sm779739266b.44.2024.09.19.17.40.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Sep 2024 17:40:01 -0700 (PDT) From: Wei Yang <richard.weiyang@gmail.com> To: akpm@linux-foundation.org, Liam.Howlett@oracle.com Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang <richard.weiyang@gmail.com> Subject: [PATCH 1/4] maple_tree: not necessary to copy mas->end + 1 Date: Thu, 19 Sep 2024 23:48:29 +0000 Message-Id: <20240919234832.24237-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240919234832.24237-1-richard.weiyang@gmail.com> References: <20240919234832.24237-1-richard.weiyang@gmail.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 452074000D X-Stat-Signature: wbgeutw4cmxeneyjrqqcqzfrak1k15b7 X-Rspam-User: X-HE-Tag: 1726792805-974580 X-HE-Meta: U2FsdGVkX1/4xqkrpUSdQxE+SHRp9E9J1gJNm5Z4omCchItU1AfHHYtpReeUTy7CAUlz/R5Ezwps7722riwpYOsWL4UJ4Yd/A5xpEtxYO9vKOfvrTKQX6jmhS/GE/AFgrbzKAj+lusXC/PQSvAfclVfYfcENFb0JFQabR1QagCDOi+NrfnmpFN/Y3oggD7rmiOMdG1ZoNsLA8gkFHOLaCG3ltzkAjqbHTYc3YAF4OkZp+udIWBk1QaKD3s89pGLSHBxPt4M5wx8PxOb13xWJ7uaSq5MEFqflo4Yg3k4bIf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X8EE2oAIiceHVIT9s1MzbQUWfEafhZMTDGO5z5mkLZO8qIze84Ybj2taZOFhv6MMHajV+TPKI6RwukczXfZyiYrY1fwDDUgNzuCdwc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000392, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
refine mas_end of mas_mab_cp()
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index a4796101decc..51f49b29b8b0 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -2099,7 +2099,7 @@ static noinline_for_kasan void mas_store_b_node(struct ma_wr_state *wr_mas, goto b_end; /* Copy end data to the end of the node. */ - mas_mab_cp(mas, slot, mas->end + 1, b_node, ++b_end); + mas_mab_cp(mas, slot, mas->end, b_node, ++b_end); b_node->b_end--; return;
mas_mab_cp() copy range [mas_start, mas_end] inclusively, so we just need to copy to mas->end which points to the last valid data in maple node. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)