Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1101405rwj; Fri, 23 Dec 2022 12:40:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXv9gVAdVMVo15yk2rCcch14KHYySbT9zJGg1KmgzR0GGk80oyzFUD3p6Q16Yc1AbbVLaeEC X-Received: by 2002:a05:6402:ea0:b0:46f:68d0:76 with SMTP id h32-20020a0564020ea000b0046f68d00076mr7715227eda.34.1671828017827; Fri, 23 Dec 2022 12:40:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671828017; cv=none; d=google.com; s=arc-20160816; b=Wh8v3sHs1radH9BnyL4N1W7bmyScKz3N9X1ssb5Rn93WiAxODvVQ+9Ff7ZA//TnncY 4eg4bV8d+URHn/W+2Vjw2ehFihnoVQzSQRumKSLAYf/buHQi8/4b5vzc7euMJxE/WTbj zxO3hBaDWVa9qySHyR9yjyt3JShDEKzOqypnIzsnEGb7zCOaKOx62ZT7PbqUdkpz4A4/ J50x/8yQ9pZI06pJA0Goi6AGrAJY8jiTWqmFwsNzWZZ723+TSZ5R19/S55xOaeUh+GjS CStgIL/yQ8wyuZ4SyW07iMWIsgbLQo0kE8R54VuhTaNFQzZz3tjdf7tWn+nARX1rhjDM y1zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l8P4LiO96AU70qR/laRSg5gCbmzlW0fQ82FdUEyjHoc=; b=dADkTsrjW7BKPbP/PZZUgQAJwIqhAQz8tuzGqrP3nic/o4EnI2Ia5b/rfJ1/74MXlm Fu7p04b6bbJcCLXbq7TSfPlT/r161vqtPOM5LPkmYJV8l11y7LPNgCceOxy/DCtEBZt1 37ccMfVWy1RsQysDq2l0SuzXCs4lhFehcfdx+BjDuu5be2KSp4sB0Yy2eLJq1f8ULTBN B6kKBRdPfZRG76kNlJNuzPknRL0EcNhezvfHSoOXLyHBhHsaqortEaIuE2jDAcRSMPt3 AVxLbK1tT6+BlKJZYE9rdicUbA0dRb/0heZuCdDEFrE6bgafJ27Jq4iRRR+rWcr9M/Fs f7Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h7bOrmUW; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c72-20020a509fce000000b0046627848e32si3392374edf.634.2022.12.23.12.39.53; Fri, 23 Dec 2022 12:40:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-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=@kernel.org header.s=k20201202 header.b=h7bOrmUW; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233182AbiLWUhN (ORCPT + 99 others); Fri, 23 Dec 2022 15:37:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233345AbiLWUhB (ORCPT ); Fri, 23 Dec 2022 15:37:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24DCE1D309; Fri, 23 Dec 2022 12:37:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B3B5E61EF5; Fri, 23 Dec 2022 20:36:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E024EC433D2; Fri, 23 Dec 2022 20:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671827819; bh=5f4h1JTh7Ym7YmoePqqN9Pp+PtyJBLUnyId3SNpncmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h7bOrmUW3fhnTg+x+VidhjcdnxirPqapDdU+dX0eyaJNzRUfcdaufj8eyUp+calwr OyiNLgf+6HE7ok378y0UR8FjTJQQu/V1DznM1pWjOE7PgLXgsQgDWeugloXgdPG6FA tPb0VywVIDEM6DExy/uSrjb19zUJCNWhJGbf2V8HDg4FS1IlcP6Cms9Te/6XFL+s3y 8V4j2+7KcN0CTZrn6OOyi+3sqCmbbhvheg/VTaVhJlZcpX/BEPuy2RE4B+/nY9vrQ1 LlO0ZdiYXFtYTYnXitWhSrTkfxHWDzYdq1mLc1Bdr1nOP35niVNWtEsAM32+mIeGR7 VSxlsvBM+b0bQ== From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, Andrey Albershteyn Subject: [PATCH v2 08/11] ext4: simplify ext4_readpage_limit() Date: Fri, 23 Dec 2022 12:36:35 -0800 Message-Id: <20221223203638.41293-9-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221223203638.41293-1-ebiggers@kernel.org> References: <20221223203638.41293-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,SUSPICIOUS_RECIPS 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-ext4@vger.kernel.org From: Eric Biggers Now that the implementation of FS_IOC_ENABLE_VERITY has changed to not involve reading back Merkle tree blocks that were previously written, there is no need for ext4_readpage_limit() to allow for this case. Signed-off-by: Eric Biggers --- fs/ext4/readpage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index d5266932ce6cd..c61dc8a7c0147 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -211,8 +211,7 @@ static void ext4_set_bio_post_read_ctx(struct bio *bio, static inline loff_t ext4_readpage_limit(struct inode *inode) { - if (IS_ENABLED(CONFIG_FS_VERITY) && - (IS_VERITY(inode) || ext4_verity_in_progress(inode))) + if (IS_ENABLED(CONFIG_FS_VERITY) && IS_VERITY(inode)) return inode->i_sb->s_maxbytes; return i_size_read(inode); -- 2.39.0