- /* The parent can't do name_to_handle_at() but the
- * directory we are interested in can? If so, it must
- * be a mount point */
- if (errno == EOPNOTSUPP)
- return 1;
-
- return -errno;
- }
-
- return mount_id != mount_id_parent;
+ if (errno == EOPNOTSUPP) {
+ if (nosupp)
+ /* Neither parent nor child do name_to_handle_at()?
+ We have no choice but to fall back. */
+ goto fallback;
+ else
+ /* The parent can't do name_to_handle_at() but the
+ * directory we are interested in can?
+ * If so, it must be a mount point. */
+ return 1;
+ } else
+ return -errno;
+ } else
+ return mount_id != mount_id_parent;