chiark / gitweb /
path-util: if parent can do name_to_handle() but relevant dir not, it's a mount point
[elogind.git] / src / shared / path-util.c
index 6a984fc1d822db741d00ddf34b6dc49d559ff604..e485c8e71e46c7a47795842010900f50d5cf54f3 100644 (file)
@@ -515,7 +515,12 @@ int fd_is_mount_point(int fd) {
                                 return 1;
                 } else
                         return -errno;
-        } else
+        } else if (nosupp)
+                /* The parent can do name_to_handle_at() but the
+                 * directory we are interested in can't? If so, it
+                 * must be a mount point. */
+                return 1;
+        else
                 return mount_id != mount_id_parent;
 
 fallback: