Dcache header mismatch building nullfs?

Dear community,

I am puzzled while building the nullfs kernel module it tries to build against d_tmpfile(dentry, inode);

but it stops while the kernel header I have instead defines:
./include/linux/dcache.h:254:23: note: expected ‘struct file *’ but argument is of type ‘struct dentry *’

As I am running Alma Linux 9 (AlmaLinux release 9.4 (Seafoam Ocelot)) with kernel version 5.14.0:
$uname -a
Linux mysystem 5.14.0-427.13.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 30 18:22:29 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux

I was expecting the declaration of the d_tmpfile to have type dentry like defined here:
linux/include/linux/dcache.h at v5.14 · torvalds/linux · GitHub

extern void d_tmpfile(struct dentry *, struct inode *);

while the kernel-devel has instead
vim /usr/src/kernels/5.14.0-427.13.1.el9_4.x86_64/include/linux/dcache.h
254 extern void d_tmpfile(struct file *, struct inode *);

Would you kindly help me to understand why there is this mismatch?

Thank you!
PS: d_tmpfile declaration parameter was changed from dentry to file starting kernel 6.1.0. Building nullfs works fine on Fedora 39 with kernel 6.8.8 (as there is a macro checking linux version against kernel version 6.1.0 in module src code).