AT_STATX_DONT_SYNC, /* don't go to the network for this – for similar reasons */
STATX_TYPE,
&sx) < 0) {
- if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno))
+ if (!ERRNO_IS_NOT_SUPPORTED(errno) && /* statx() is not supported by the kernel. */
+ !ERRNO_IS_PRIVILEGE(errno) && /* maybe filtered by seccomp. */
+ errno != EINVAL) /* glibc's fallback method returns EINVAL when AT_STATX_DONT_SYNC is set. */
return -errno;
/* If statx() is not available or forbidden, fall back to name_to_handle_at() below */
AT_STATX_DONT_SYNC, /* don't go to the network, mnt_id is a local concept */
STATX_MNT_ID,
&buf.sx) < 0) {
- if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno))
+ if (!ERRNO_IS_NOT_SUPPORTED(errno) && /* statx() is not supported by the kernel. */
+ !ERRNO_IS_PRIVILEGE(errno) && /* maybe filtered by seccomp. */
+ errno != EINVAL) /* glibc's fallback method returns EINVAL when AT_STATX_DONT_SYNC is set. */
return -errno;
/* Fall back to name_to_handle_at() and then fdinfo if statx is not supported or we lack