if (vi->datalayout != EROFS_INODE_FLAT_INLINE)
return 0;
- /* fast symlink (following ext4) */
+ /* fast symlink */
if (S_ISLNK(inode->i_mode) && inode->i_size < PAGE_SIZE) {
char *lnk = erofs_kmalloc(sbi, inode->i_size + 1, GFP_KERNEL);
m_pofs += vi->inode_isize + vi->xattr_isize;
- /* inline symlink data shouldn't across page boundary as well */
+ /* inline symlink data shouldn't cross page boundary as well */
if (m_pofs + inode->i_size > PAGE_SIZE) {
kfree(lnk);
errln("inline data cross block boundary @ nid %llu",
return -EFSCORRUPTED;
}
- /* get in-page inline data */
memcpy(lnk, data + m_pofs, inode->i_size);
lnk[inode->i_size] = '\0';