aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/migrate.c')
-rw-r--r--fs/ext4/migrate.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index e7cd488da4bb..734abca25e35 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -459,13 +459,13 @@ int ext4_ext_migrate(struct inode *inode)
459 struct list_blocks_struct lb; 459 struct list_blocks_struct lb;
460 unsigned long max_entries; 460 unsigned long max_entries;
461 461
462 if (!test_opt(inode->i_sb, EXTENTS)) 462 /*
463 /* 463 * If the filesystem does not support extents, or the inode
464 * if mounted with noextents we don't allow the migrate 464 * already is extent-based, error out.
465 */ 465 */
466 return -EINVAL; 466 if (!EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
467 467 EXT4_FEATURE_INCOMPAT_EXTENTS) ||
468 if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) 468 (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
469 return -EINVAL; 469 return -EINVAL;
470 470
471 if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0) 471 if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0)