Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp327487imi; Thu, 21 Jul 2022 23:13:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v/8G3etAvkZnkdpZFsS7ywCHVUhllt8yWY6G8y3jjF0d+mN9WFQoDPIOGMr+iJoz8VhFmU X-Received: by 2002:a17:902:efd5:b0:16d:2da8:64a7 with SMTP id ja21-20020a170902efd500b0016d2da864a7mr1873733plb.157.1658470388825; Thu, 21 Jul 2022 23:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658470388; cv=none; d=google.com; s=arc-20160816; b=yB4l7zPABuBkkLZVZpG0ZXEwP2LqMZ/OWIzrW2VI6dfpUwKH+VIDul5vYXe5Z83239 e9P/qVtuKdBajWJW2yl6ct6rpDukVeT2mj/0HTD//tPMUvomNeIaDDo+7SDf9QIIsSHe Gw7yjvpF5JiDUr6NaVUEiEIYlSGnBLJCyj4stlN3bXa8+qHjOr6BVsUPAg+dW8J6MG7X VE/muR9xayeHUwVn/dmzCa+/2+F2nhhlA/cYwE3Z26CN/rU1UgypZWVLq92eNNQfSh2v zVyhDk9f1TYXMDviLgdXmY7Wcc4fDvu6NyORLQ4Xg8SjLnxsXSEUUnlcIdl1bymJUuU6 4K+g== 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:content-language:subject:user-agent:mime-version :date:message-id; bh=b9W9pb310T2mwg56jGx9T2w584kI6XwuNzPHSMRWta0=; b=tsVzdUUggtbGenE1R2A9INv/MR4BFWupoTS2oQaCcOU28Pcs3B1atg6Fyi0bv3swFN c4elH53AGbOlgCZej3Du1qCJAK//vPxKeRvVCqwaTEf1e6t6pecd6y17V6Yr2IOCK/k5 XJWx1U1Pdl5a2iVhExwoObu/ALeDko36g79p14SUQYqxrjMIwgsQ7wMUG0z5ashQvWZe OMfT2Lp4cQe1sFGgc3bW4nkhzf+pc4I9emqNbg0eGIfN6exulss8MCgOSMZkEDjH8iJe Tbh98sgWSDdxCLDay8Ur4tdLvkPOOQ2UQsg+AF7OztCS+tc/pi60XvmOZ4MdyFtvF3cS ksPw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a63de51000000b0041a625e8cecsi4884461pgi.55.2022.07.21.23.12.54; Thu, 21 Jul 2022 23:13:08 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232768AbiGVGKr (ORCPT + 99 others); Fri, 22 Jul 2022 02:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbiGVGKl (ORCPT ); Fri, 22 Jul 2022 02:10:41 -0400 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0A321EC6B for ; Thu, 21 Jul 2022 23:10:38 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R571e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VK4..rj_1658470235; Received: from 30.227.66.15(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VK4..rj_1658470235) by smtp.aliyun-inc.com; Fri, 22 Jul 2022 14:10:36 +0800 Message-ID: <528c0378-90c2-8bcd-032c-837fc82bb321@linux.alibaba.com> Date: Fri, 22 Jul 2022 14:10:35 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] erofs: get rid of the leftover PAGE_SIZE in dir.c Content-Language: en-US To: Gao Xiang , Chao Yu , linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org References: <20220619150940.121005-1-hsiangkao@linux.alibaba.com> From: JeffleXu In-Reply-To: <20220619150940.121005-1-hsiangkao@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 On 6/19/22 11:09 PM, Gao Xiang wrote: > Convert the last hardcoded PAGE_SIZEs of uncompressed cases. > > Signed-off-by: Gao Xiang > --- > fs/erofs/dir.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c > index 18e59821c597..723f5223a4fa 100644 > --- a/fs/erofs/dir.c > +++ b/fs/erofs/dir.c > @@ -90,7 +90,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) > > nameoff = le16_to_cpu(de->nameoff); > if (nameoff < sizeof(struct erofs_dirent) || > - nameoff >= PAGE_SIZE) { > + nameoff >= EROFS_BLKSIZ) { > erofs_err(dir->i_sb, > "invalid de[0].nameoff %u @ nid %llu", > nameoff, EROFS_I(dir)->nid); > @@ -99,7 +99,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) > } > > maxsize = min_t(unsigned int, > - dirsize - ctx->pos + ofs, PAGE_SIZE); > + dirsize - ctx->pos + ofs, EROFS_BLKSIZ); > > /* search dirents at the arbitrary position */ > if (initial) { LGTM. Reviewed-by: Jeffle Xu -- Thanks, Jeffle