get_file_info and fd_get_file_info duplicate the same logic except that they either work on paths or file descriptors (respectively). This patch consolidates these two routines and moves some of the path-specific behavior to an updated [fd_]is_mount_point. Besides consolidation, this patch simplifies the reparse point patches (updates in progress) since there's now only one routine that handles both path-based and fd-based requests for file information.
Note: fstatat (used by is_mount_point) is not compatible with Mac OS X prior to 10.10; however, this is already used by the current fd_is_mount_point and if such compatibility is required at some point then there are libraries available that provide this functionality ( https://www.winehq.org/pipermail/wine-devel/2021-August/194021.html ).
v2: is_mount_point now uses fstatat for both code paths in patch 1 instead of adding churn by waiting until patch 2
Best, Erich