summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ext4_common.c')
-rw-r--r--fs/ext4/ext4_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 680e0011cc..eebca7de91 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -453,8 +453,13 @@ restart:
sizeof(struct ext2_dirent) + padding_factor;
if ((fs->blksz - totalbytes - last_entry_dirlen) <
new_entry_byte_reqd) {
- printf("1st Block Full:Allocate new block\n");
+ printf("Last Block Full:Allocate new block\n");
+ if (le32_to_cpu(g_parent_inode->flags) &
+ EXT4_EXTENTS_FL) {
+ printf("Directory uses extents\n");
+ goto fail;
+ }
if (direct_blk_idx == INDIRECT_BLOCKS - 1) {
printf("Directory exceeds limit\n");
goto fail;