Commit 5e122148 authored by Eric Biggers's avatar Eric Biggers
Browse files

ext4: simplify ext4_readpage_limit()



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: default avatarEric Biggers <ebiggers@google.com>
Tested-by: default avatarOjaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20221223203638.41293-9-ebiggers@kernel.org
parent 56124d6c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);