DQUOT_FREE_INODE(inode);
goto fail2;
}
-+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
++ if (test_opt(sb, EXTENTS) && (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) {
+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
+ ext3_extents_initialize_blockmap(handle, inode);
+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
DQUOT_FREE_INODE(inode);
goto fail2;
}
-+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
++ if (test_opt(sb, EXTENTS) && (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) {
+ EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
+ ext3_extents_initialize_blockmap(handle, inode);
+ if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
/* NB: Files created while extents are enabled cannot be read
if mounted with a kernel that doesn't include the CFS
patches! */
- if (IS_OST(ldd) &&
+ if ((IS_OST(ldd) || IS_MDT(ldd)) &&
ldd->ldd_mount_type == LDD_MT_LDISKFS) {
strcat(default_mountopts, ",extents,mballoc");
}