In ext2fs_add_dir_block() the dblist allocation size was changed to
grow as the number of items in the dblist increases. However, the
error handling in case of allocation failure wasn't changed to match.
Fix the error case to revert to the old allocation size on failure.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
sizeof(struct ext2_db_entry),
&dblist->list);
if (retval) {
- dblist->size -= 100;
+ dblist->size = old_size / sizeof(struct ext2_db_entry);
return retval;
}
}