Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp539662rwr; Wed, 26 Apr 2023 03:00:55 -0700 (PDT) X-Google-Smtp-Source: AKy350acYH2ryjz/UqSDgFHgC6DLuAMuTqn1x68sUcg/vrc8f3k0cbU8kIVzJpzHEcHmvv279MnE X-Received: by 2002:a05:6a21:798:b0:c6:c0c1:b1fe with SMTP id mg24-20020a056a21079800b000c6c0c1b1femr22075535pzb.57.1682503254870; Wed, 26 Apr 2023 03:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682503254; cv=none; d=google.com; s=arc-20160816; b=CbYluGNrBtEW8abtwoDA/m++9yFUvTtZxesI2YqYkPj/++Y1GM0swijeCnv0aUGano 0Jcnj2wpZ3UifuMJ+NKXV3Z1gPkZHE/8FJKpaz/HyLCE8jKHUC7S/Ih0mbmglyD9YfTl 7h6r8kwQp0ErYECvYAz5z9qaBmEjhHnAMu21jYIvENPU+antzFhx30HTdgfvEOlN9cvk 1WgCAKSUrFTKfJqBw3SDjgH10n7n3BbNfhK7N9U8Cm4RegjCur38joD0hE66mxc9RtDM XLPjcDUCZakG/gRNdrw1D2uQJTLHvE8hb4qhkNcB+O4mPJTNl2ABSGHoFZhm9FjlH5fg DkQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=RDQSmR3vhfuY5wD7//ZjiyUrNw8FfLpaCbF2hNAW7A8=; b=HLsplHKyJtBse7/xjgaoOb6hUaSFa66YNKKHJo9mQ3gnElDuuqG6e6ha9YaPWlx4Nf iiYIsnDu+Q8H1jg5LV7FAkvT/sO3qvaj7Qcn1vob7WeASzVxwNvsWa5DZJLhwxAuo1KH 3pxXEDIOywnzZCvg0YYEYPNHRhddBGm1H6RxqWUS8QY84payjXaJsjlFFFPgNbS8+PcO dBwg50W1w+EaK6zhrVoxilQEFve3UKujG3Ejv4FzYPYMz+pb20SFm1ob7ZKoRrb+vphb C1zK9etWu2voC4riiOVJnUBC5GXlbp/N+IPLKes8AI6WWbCIOQw7LvTi6pu6yYQHzH45 IYaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=UChbCaTH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b004fab4df6dfdsi16239696pgb.369.2023.04.26.03.00.39; Wed, 26 Apr 2023 03:00:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=UChbCaTH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239976AbjDZJ75 (ORCPT + 99 others); Wed, 26 Apr 2023 05:59:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239308AbjDZJ7z (ORCPT ); Wed, 26 Apr 2023 05:59:55 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D1BC4EF2 for ; Wed, 26 Apr 2023 02:59:16 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-63b8b19901fso8449878b3a.3 for ; Wed, 26 Apr 2023 02:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1682503153; x=1685095153; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=RDQSmR3vhfuY5wD7//ZjiyUrNw8FfLpaCbF2hNAW7A8=; b=UChbCaTHDh1zDI2Mpv3WMMKP3U0l8VlU7gu+cMaGz9dE0Ei9Mqykvs0cihczEstdSy EY6QxBuqPazZbWYrtzpfOSF5gw03gCVV6SUCR5SM5PIv9prj07Lfh2/MJuzyE1gxj0Jt V6RS7HCRVD67MT55J4G4zun3lz2NZrFz1IslSwhqrUdrhonOzjGNrgZXTkrsMvh6fdT8 6QufwBaCnR6dhFEiy1Om0maCKqoOtBjEF6zepJ87py6o5eIztsaoZl+dFdV64ZQjOOS/ MeblJzB2WrcJjKLKK8vPB/3V9TltmzAL3ZCrtJHIoM7iYYmlDXH5Vi1Cx9FCFSvZY4qR j2BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682503153; x=1685095153; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RDQSmR3vhfuY5wD7//ZjiyUrNw8FfLpaCbF2hNAW7A8=; b=YPrceZVvG+DjvU6xQcnb95TVJNO2XFlenRLb6DdmxXqxLz1wji32vOBM/aHh0FoVAw azKjpuTLFGUFtr96CDr306Ax3dS52Do6T54JQMiH7gooW8UvYUE5JvpMTs7GAsg7XD9S rBfKLG3Mg9uNBBqJ8LNUECqc5m4kMoJHWB29LmTBAH/jp83G3KV+SpY9gE5zCyTr93IQ psNTDYWhpTGyriahCLdf/oGR2gJZO4UJO0U42VL1JIJhivQw9tsYWK7/4/mWxviYQsNy yayu/boSasLZoWGQHtLcD3u+qYyngRedVvFv39mNwppcNzOJrCJayQvNpk7t13Oc6vda UA2g== X-Gm-Message-State: AAQBX9eFxI9Fa0vjqltHVrbLUVXU2Jdqw4GTBJgDEtO27wWbhQCxaLnG ExNskvg/zNa/4vG4QYWYYNhIrj7P1G1sXQ9RTOo= X-Received: by 2002:a05:6a00:23d6:b0:63d:2910:5c8b with SMTP id g22-20020a056a0023d600b0063d29105c8bmr27702193pfc.29.1682503153326; Wed, 26 Apr 2023 02:59:13 -0700 (PDT) Received: from [10.200.11.252] ([139.177.225.236]) by smtp.gmail.com with ESMTPSA id c15-20020a624e0f000000b0063f534f0937sm5939078pfb.46.2023.04.26.02.59.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Apr 2023 02:59:13 -0700 (PDT) Message-ID: <0201ec78-5b43-40e1-c1a0-4891f47206dc@bytedance.com> Date: Wed, 26 Apr 2023 17:59:08 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH 20/34] maple_tree: Remove unnecessary check from mas_destroy() To: "Liam R. Howlett" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, maple-tree@lists.infradead.org, Andrew Morton References: <20230425140955.3834476-1-Liam.Howlett@oracle.com> <20230425140955.3834476-21-Liam.Howlett@oracle.com> From: Peng Zhang In-Reply-To: <20230425140955.3834476-21-Liam.Howlett@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/4/25 22:09, Liam R. Howlett 写道: > mas_destroy currently checks if mas->node is MAS_START prior to calling > mas_start(), but this is unnecessary as mas_start() will do nothing if > the node is anything but MAS_START. > > Signed-off-by: Liam R. Howlett Reviewed-by: Peng Zhang > --- > 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 89e30462f8b62..35c6e12ca9482 100644 > --- a/lib/maple_tree.c > +++ b/lib/maple_tree.c > @@ -5817,9 +5817,7 @@ void mas_destroy(struct ma_state *mas) > if (mas->mas_flags & MA_STATE_REBALANCE) { > unsigned char end; > > - if (mas_is_start(mas)) > - mas_start(mas); > - > + mas_start(mas); > mtree_range_walk(mas); > end = mas_data_end(mas) + 1; > if (end < mt_min_slot_count(mas->node) - 1)