You have to invoke e2fsck. This will go over the entire disk, and
locate the inode which is not connected to a directory. It will
then recover the inode, and put it into lost+found if appropriate.
> Can anyone direct me to the appropriate kernel code for this ...
Looking at fs/ext2/namei.c:ext2_create, you can see that the inode
is allocated with ext2_new_inode. Then, the directory is modified with
ext2_add_entry. Finally, if in synchronous mode, create waits for
the directory be written back to disk.
In asynchronous mode, the disk driver might chose to write back
in a different order, so all other kinds of corruptions might happen.
Regards,
Martin