Commit fa125f4e authored by Mantas Mikulėnas's avatar Mantas Mikulėnas Committed by Lennart Poettering

path-util: fall back to stat() if kernel does not support name_to_handle_at()

Fixes instant hang on kernels that do not have CONFIG_FHANDLE enabled.
parent 8ac75493
......@@ -349,8 +349,8 @@ int path_is_mount_point(const char *t, bool allow_symlink) {
r = name_to_handle_at(AT_FDCWD, t, h, &mount_id, allow_symlink ? AT_SYMLINK_FOLLOW : 0);
if (r < 0) {
if (errno == ENOTSUP)
/* This file system does not support
if (errno == ENOSYS || errno == ENOTSUP)
/* This kernel or file system does not support
* name_to_handle_at(), hence fallback to the
* traditional stat() logic */
goto fallback;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment