Based on this description:
"Function: errcode_t ext2fs_expand_dir (ext2_filsys fs,
ext2_ino_t dir)
This function adds a new empty directory block and
appends it to the directory dir. This allows functions
such as ext2fs_link to add new directory entries to a
directory which is full."
I am given the impression that ext2fs_link should call
ext2fs_expand_dir if there is no space left in the
directory.
I found this because of a bug in debugfs:
debugfs does not always check for EXT2_ET_DIR_NO_SPACE
error after calling ext2fs_link. This caused me to get
an error message saying: No free space in the directory
when it called make_link.
Based on the above description of ext2fs_expand_dir, I
decided the proper place for the fix was inside
libext2fs: ext2fs_link
patch to add missing functionality in ext2fs_link