aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/migrate.c6
-rw-r--r--fs/ext4/namei.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 3ebc2332f52e..9ee1f7cfb2c5 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,
414 if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) 414 if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
415 return -EINVAL; 415 return -EINVAL;
416 416
417 if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
418 /*
419 * don't migrate fast symlink
420 */
421 return retval;
422
417 down_write(&EXT4_I(inode)->i_data_sem); 423 down_write(&EXT4_I(inode)->i_data_sem);
418 handle = ext4_journal_start(inode, 424 handle = ext4_journal_start(inode,
419 EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + 425 EXT4_DATA_TRANS_BLOCKS(inode->i_sb) +
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index d153bb5922fc..a9347fb43bcc 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2223,6 +2223,7 @@ retry:
2223 inode->i_op = &ext4_fast_symlink_inode_operations; 2223 inode->i_op = &ext4_fast_symlink_inode_operations;
2224 memcpy((char*)&EXT4_I(inode)->i_data,symname,l); 2224 memcpy((char*)&EXT4_I(inode)->i_data,symname,l);
2225 inode->i_size = l-1; 2225 inode->i_size = l-1;
2226 EXT4_I(inode)->i_flags &= ~EXT4_EXTENTS_FL;
2226 } 2227 }
2227 EXT4_I(inode)->i_disksize = inode->i_size; 2228 EXT4_I(inode)->i_disksize = inode->i_size;
2228 err = ext4_add_nondir(handle, dentry, inode); 2229 err = ext4_add_nondir(handle, dentry, inode);