diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 3ebc2332f52ec072da353ef1466dfaaea3cd2baf..9ee1f7cfb2c541b9908fe8821a43e708efaea87d 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -414,6 +414,12 @@ int ext4_ext_migrate(struct inode *inode, struct file *filp, if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) return -EINVAL; + if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0) + /* + * don't migrate fast symlink + */ + return retval; + down_write(&EXT4_I(inode)->i_data_sem); handle = ext4_journal_start(inode, EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index d153bb5922fc1dc79021e5ad84d5108d81702e74..a9347fb43bcca34dde35173aa1eb1dcccbc50d27 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2223,6 +2223,7 @@ static int ext4_symlink (struct inode * dir, inode->i_op = &ext4_fast_symlink_inode_operations; memcpy((char*)&EXT4_I(inode)->i_data,symname,l); inode->i_size = l-1; + EXT4_I(inode)->i_flags &= ~EXT4_EXTENTS_FL; } EXT4_I(inode)->i_disksize = inode->i_size; err = ext4_add_nondir(handle, dentry, inode);