Is it safe to call IoQueryFileDosDeviceName from process create notification routine ?

Hello !
I am using PsSetCreateProcessNotifyRoutineEx and call IoQueryFileDosDeviceName(for process file object) from notification callback. Testing this on windows 10 x64 with my driver and nt both under verifier. In practice everything works without any problems.
However here https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/windows-kernel-mode-process-and-thread-manager#best It is advised to not call blocking functions from this callback.

So it it working in practice. But is it theoretically safe to call IoQueryFileDosDeviceName from this callback ?

What is intention of this check?
Do you want to take name of main image of process created? If so then querying FO is not needed.