rename on handle obtained by IoCreateFileSpecifyDeviceObjectHint() fails on Vista

I call ZwSetInformationFile(FileRenameInformation) on handle obtained by IoCreateFileSpecifyDeviceObjectHint() with DeviceObject != NULL. Device object is not top level device but next device in the device stack. It is relative rename, so RootDirectory contains handle to parent directory of destination of file and Filename contains only filename - no path. Handle to RootDirectory is opened also by IoCreateFileSpecifyDeviceObjectHint() with the same DeviceObject. The ZwSetInformationFile() fails with STATUS_INVALID_DEVICE_OBJECT_PARAMETER.

After some debugging I more and more believe that it is a Vista specific bug.

I tried to step through NtSetInformationFile(). It calls IopOpenLinkOrRenameTarget(), which tries to open again target directory by IoCreateFileEx() which fails. After some observation of parameters passed to IoCreateFileEx() it seems that field DeviceObjectHint in DRIVER_CREATE_CONTEXT structure contains pointer to pointer to device instead of pointer to device object. I verified that it should contain direct pointer to device by stepping through IoCreateFileSpecifyDeviceObjectHint(), which also calls IoCreateFileEx().

Furthermore it works fine on XP. Note that XP calls IoCreateFileSpecifyDeviceObjectHint() from IopOpenLinkOrRenameTarget(), so changing of API probably introduced bug in vista code.

Does someone else experience the problem? Can someone with access to vista source code confirm that it is bug?

Thanks
-bg