ZwSetInformationFile failed with status 0x80000005

I am working on a volume filter driver and from this driver i tried to
delete the file. The file name is too long including the path. I have first
opened the file using ZwCreateFile and it returns status zero that means
file has opened succesfully. i want to delete this file . For achieving
this, i have called ZwSetInformationFile and passed the
fileDipositionInformation as the file class and set the DeleteFile variable
to true. This function returns with status 0x80000005 and after closing the
handle to the file that file gets deleted sometimes and sometimes doesnot
get deleted. I am not able to figure out why this is happening. Most of the
time file gets deleted but some times files remains there.

But my question is that after returning 0x80000005 (STATUS_BUFFER_OVERFLOW),
why maximum files gets deleted after closing last file handle to the file
and some remains there.

Regards

Rohit

When the file name is small then their is no error. ZwSetInformationFile returns STATUS_SUCCESS