Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2434406ybb; Mon, 30 Mar 2020 06:08:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuXrHOyEfnZTys3ZLq9njr5fvrOmCWtNGXH7q8LjHt35IIK1XnupHRro1BUd71+mu92sFEu X-Received: by 2002:aca:4991:: with SMTP id w139mr7552017oia.145.1585573704172; Mon, 30 Mar 2020 06:08:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585573704; cv=none; d=google.com; s=arc-20160816; b=MTkz04H8553Od/1dt1FiP4LY0MPzh49GI6R2/DzYK2iB8++KfdV3t2ZOsQrgq9HJUq 9SnMD9z08l6MReRJucEnFrtPWNZ7trT1jjWB4HH/PyxGoCLXGHSx/3vueqPRT8KDe0at dVt7kvMGgnnav4Beg7Dy2EtrqjEjvI3iBkKkMqJv2L1WF90HV0ro32DXKyP7spkHNLlg 0XesDNbsIr7Q90gLYVMBxKqywZD5I3NTwvDWTqlOt9JHVpTbHTYxJKimt9xgGNAhtpIy I/uKOB0JlGFHDn1wi+lq9fbWNJjDiFp6XYc30pfzuLFDmQ+S/a2eKiugefrVii7Mas5A GYpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KoG1QqhWD1DcdiyrT8mNu3Jh9PyD80FSFlC875tDkbg=; b=IE5cOiC0P4Ji1n822z32SIoqZs2MGZLKDCETDp3XkIlmAoWMPcF0nwWRGpOn3pJJ9K Fx7fChVKu7yLMDxW9VFlO1T7XJ/H8KHZVsVnYuylGqYNu59bdpJN8iqG0sCCt18AURR2 HvvVaHGSl7mTP5UeL2ywUyWI03yQQyp7BcdiJtnaL4fZtBHQg4Zl5nZSKJBfuJ9sB1Eh tvW7evwZhqwRo4DFuiA2VHvJaO+rL67V8izGH5weMpQ/QJIryvMXaE3MXCVFNPJSSAke kveujC+py3HmSRQcvIXgzQQ85us5Rho1CeoEhbz4N07hMpFIYhJCKzT9yv4jVpZceAJW PXLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=W5uUEn5r; 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 o20si6096660ota.17.2020.03.30.06.08.07; Mon, 30 Mar 2020 06:08:24 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=W5uUEn5r; 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 S1730079AbgC3Msn (ORCPT + 99 others); Mon, 30 Mar 2020 08:48:43 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37852 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729881AbgC3Msm (ORCPT ); Mon, 30 Mar 2020 08:48:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KoG1QqhWD1DcdiyrT8mNu3Jh9PyD80FSFlC875tDkbg=; b=W5uUEn5r8yh0jhrS1xrnbRssqv hS/dhGgDfiWbmfXeGJurthXsutWWrF/yptFlqVcmXTuKT+htNNjybaJZ5pizOD9e8pjXMBY41ERHa 6qPkXu3ADyBRsacmsXmvbaY3piLbDTID1YOYOHFNWeD14r5A6D1+4/pPST2+ID95eyAra++hzF9bs 0feVCH1b3Jgube9joSG6I5pRbtjWIcFXMKIVJMEza1+rxgLh3zarnlwH3iXWpeHBqOEog63G7jSKv +BYQ+jCI0RJawLMevk92CR3m0YmmbLEU68TrcVe9P/voffb8CK2RYCX6hqCDyaKAwijYlOI4OT4bg jnbqyQJg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jItqM-0002FV-8s; Mon, 30 Mar 2020 12:48:42 +0000 Date: Mon, 30 Mar 2020 05:48:42 -0700 From: Matthew Wilcox To: Wei Yang Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/9] XArray: entry in last level is not expected to be a node Message-ID: <20200330124842.GY22483@bombadil.infradead.org> References: <20200330123643.17120-1-richard.weiyang@gmail.com> <20200330123643.17120-6-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200330123643.17120-6-richard.weiyang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 30, 2020 at 12:36:39PM +0000, Wei Yang wrote: > If an entry is at the last level, whose parent's shift is 0, it is not > expected to be a node. We can just leverage the xa_is_node() check to > break the loop instead of check shift additionally. I know you didn't run the test suite after making this change.