From: Lennart Poettering Date: Sat, 4 Apr 2015 17:20:56 +0000 (+0200) Subject: path-util: if parent can do name_to_handle() but relevant dir not, it's a mount point X-Git-Tag: v226.4~1^2~524 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=646ccf657ac4b1aaeedfc06952f4d78d2e4f7d02 path-util: if parent can do name_to_handle() but relevant dir not, it's a mount point --- diff --git a/src/shared/path-util.c b/src/shared/path-util.c index 6a984fc1d..e485c8e71 100644 --- a/src/shared/path-util.c +++ b/src/shared/path-util.c @@ -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: