diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 5f1890e309c6ebaeebc4672a1665a4ec65043a53..d9a0763f459570eecf91dd2dcbd8e2b1bd1f6417 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1841,7 +1841,7 @@ static void z_erofs_pcluster_readmore(struct z_erofs_decompress_frontend *f,
 	}
 
 	cur = map->m_la + map->m_llen - 1;
-	while (cur >= end) {
+	while ((cur >= end) && (cur < i_size_read(inode))) {
 		pgoff_t index = cur >> PAGE_SHIFT;
 		struct page *page;