From: Gao Xiang Date: Wed, 24 Sep 2025 03:28:26 +0000 (+0800) Subject: erofs: drop redundant sanity check for ztailpacking inline X-Git-Tag: v6.18-rc1~223^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2d3af0d64e5fe2ee269e8f082642f82bcca3903;p=thirdparty%2Flinux.git erofs: drop redundant sanity check for ztailpacking inline It is already performed in z_erofs_map_blocks_fo(). Also align the error message with that used for the uncompressed inline layout. Signed-off-by: Gao Xiang --- diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 625b8ae8f67f0..bc80cfe482f73 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -823,9 +823,6 @@ static int z_erofs_pcluster_begin(struct z_erofs_frontend *fe) } rcu_read_unlock(); } - } else if ((map->m_pa & ~PAGE_MASK) + map->m_plen > PAGE_SIZE) { - DBG_BUGON(1); - return -EFSCORRUPTED; } if (pcl) { diff --git a/fs/erofs/zmap.c b/fs/erofs/zmap.c index 798223e6da9ce..e5581dbeb4c2b 100644 --- a/fs/erofs/zmap.c +++ b/fs/erofs/zmap.c @@ -462,8 +462,8 @@ static int z_erofs_map_blocks_fo(struct inode *inode, map->m_pa = vi->z_fragmentoff; map->m_plen = vi->z_idata_size; if (erofs_blkoff(sb, map->m_pa) + map->m_plen > sb->s_blocksize) { - erofs_err(sb, "invalid tail-packing pclustersize %llu", - map->m_plen); + erofs_err(sb, "ztailpacking inline data across blocks @ nid %llu", + vi->nid); err = -EFSCORRUPTED; goto unmap_out; }