Get back unlink() & rmdir() on 2.6.18.
Also remove a wrong kfree() call.

This should be highly simplified by the usage of a generic type...