> if (is_anon_ns(ns)) { > /* > * Can't move the root of namespace into the same > * namespace. Reject that early. > */ > if (ns == p->mnt) > goto out; > What am I missing here? Seems good to me. Thanks. > Another odd thing: what's the point rejecting move of /foo/bar/baz/ beneath > /foo? What's wrong with doing that? _IF_ that's really intended, it needs > at least a comment spelling that out. TBH, for quite a while I'd been > staring at that wondering WTF do you duplicate the common check for target > not being a descendent of source, but with different error value. Until > spotting that the check is about _source_ being a descendent of target > rather than the other way round... You mean: for (struct mount *p = mnt_from; mnt_has_parent(p); p = p->mnt_parent) if (p == mnt_to) return -EINVAL; I wasn't sure whether the resulting mount tree was sane under all conditions for the service configuration update use-case. Feel free to remove it.