chiark / gitweb /
path-util: if parent can do name_to_handle() but relevant dir not, it's a mount point
authorLennart Poettering <lennart@poettering.net>
Sat, 4 Apr 2015 17:20:56 +0000 (19:20 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:49:53 +0000 (07:49 +0100)
src/shared/path-util.c

index 6a984fc..e485c8e 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: