Why
This is consistent with Linux.
How
The definition is moved from <linux/shmem_fs.h> to <linux/pagemap.h> and the latter is included from the former. This is how it is done on Linux.
Prototypes are also expanded with argument names. I got a build failure in the DRM 5.18 drivers because the compiler considered that the pgoff_t argument was there twice.
This is part of the update of the DRM drivers to Linux 5.18.