From 4a891daec07f271ce0e0a54b1a6e84ba74f54851 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 4 Apr 2015 19:20:56 +0200 Subject: path-util: if parent can do name_to_handle() but relevant dir not, it's a mount point Signed-off-by: Anthony G. Basile --- src/shared/path-util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/shared/path-util.c b/src/shared/path-util.c index e478f6f43e..8678ef516b 100644 --- a/src/shared/path-util.c +++ b/src/shared/path-util.c @@ -375,7 +375,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: -- cgit v1.2.3-54-g00ecf