[PATCH openEuler-1.0-LTS 3/6] configfs: factor dirent removal into helpers